Fixed memory leak on photo processor