msm: vidc: Fix release buffers to prevent mem leak

Fix a bug in release buffers and clean up code to reuse already
existing functionality. Without this fix release buffers was
failing which might result in memory leak.

Change-Id: Iedaa19657b69883dd0c66654ada8f0e5bf2ec03f
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
2 files changed