Skip to content

Commit

Permalink
staging: rtl8188eu: memory leak in rtw_free_cmd_obj()
Browse files Browse the repository at this point in the history
We were fixing checkpatch.pl warnings and accidentally reversed this
condition.

Fixes: 5b29aaa ("staging: rtl8188eu: removes comparison to null")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jul 16, 2017
1 parent 397fcd1 commit 011ce71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8188eu/core/rtw_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 011ce71

Please sign in to comment.