s4-common: camera: fix possible memory leak

Change-Id: I63cee86a176bfd8728cc682890ded920661dd281