From: Dan Carpenter Date: Wed, 12 Jul 2017 07:51:33 +0000 (+0300) Subject: staging: rtl8188eu: memory leak in rtw_free_cmd_obj() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=011ce71609e9cd0751b495e24ff8c83fa8d7c7db;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8188eu: memory leak in rtw_free_cmd_obj() We were fixing checkpatch.pl warnings and accidentally reversed this condition. Fixes: 5b29aaaa1e3c ("staging: rtl8188eu: removes comparison to null") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 002d09159896..a69007ef77bf 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -132,7 +132,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd) kfree(pcmd->parmbuf); } - if (!pcmd->rsp) { + if (pcmd->rsp) { if (pcmd->rspsz != 0) { /* free rsp in cmd_obj */ kfree(pcmd->rsp);