media: s5p_mfc: fix doublly free issue
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Wed, 2 Apr 2014 07:58:36 +0000 (15:58 +0800)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:47:26 +0000 (11:47 +0900)
commit8525f4e678f85d38cdc533046c9ceb7f28123976
tree82c4440bbfd067ac3bccc3aa07fdae1cc5ba0e51
parentd96c1054b3c043d066cb50e024cf18b4624d8ffc
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]