From: Lothar Waßmann Date: Wed, 5 Dec 2012 09:42:49 +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=refs%2Fremotes%2Fkc%2Fimx-drm-bugfix;p=karo-tx-linux.git staging: drm/imx: fix double free bug in error path --- 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; }