media: s5p_mfc: fix doublly free issue
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Wed, 2 Apr 2014 07:58:36 +0000 (15:58 +0800)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 15 May 2014 05:28:27 +0000 (07:28 +0200)
commit9d4c87d48db1e8fd59b7b6dfdaae86137302d5c0
tree00ef82df7299c994df324f23fca8c1d37cc2d783
parent8ace9bd8f038499c0e897a3f901276e233b4a119
media: s5p_mfc: fix doublly free issue

When video_register_device() returns failure, vfd will be freed at once and
dev->vfl_dec will be freed after label "err_dec_reg", but the two pointers point
to the same area, so it was doublly freed here. Since video_device_release()
will be called by video_unregister_device() indirectly, we should remove the
two other calls after labels err_enc_reg and err_dec_reg.

Change-Id: I5ee8f83eeb47443e2f772914127514eab996c347
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c [changed mode: 0644->0755]