From: Lothar Waßmann Date: Tue, 25 Dec 2012 14:58:39 +0000 (+0100) Subject: staging: drm/imx: fix double free bug in error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=efe57d5977fa62b8fdf3a38c236d1aa5351228be;p=linux-beck.git staging: drm/imx: fix double free bug in error path kfree(imx_drm_encoder) is already being called at the label 'err_register'. Signed-off-by: Lothar Waßmann Acked-by: Sascha Hauer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index ecf0f44bc70e..cec19f1cf56c 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -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; }