Commit 011ce716 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: rtl8188eu: memory leak in rtw_free_cmd_obj()

We were fixing checkpatch.pl warnings and accidentally reversed this
condition.

Fixes: 5b29aaaa ("staging: rtl8188eu: removes comparison to null")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 397fcd12
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment