Skip to content

Commit

Permalink
staging: drm/imx: fix double free bug in error path
Browse files Browse the repository at this point in the history
kfree(imx_drm_encoder) is already being called at the label
'err_register'.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Lothar Waßmann authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 9a8f3f4 commit efe57d5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/staging/imx-drm/imx-drm-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ int imx_drm_add_encoder(struct drm_encoder *encoder,

ret = imx_drm_encoder_register(imx_drm_encoder);
if (ret) {
kfree(imx_drm_encoder);
ret = -ENOMEM;
goto err_register;
}
Expand Down

0 comments on commit efe57d5

Please sign in to comment.