Skip to content

Commit

Permalink
iwlwifi: Fix memory leak in iwl_req_fw_callback()
Browse files Browse the repository at this point in the history
In this routine, kzalloc allocates a memory block. This allocation is
freed in the error paths, but not in the normal exit, thus the allocation
is leaked.

The kmemleak facility was used to find the leak.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>
  • Loading branch information
Larry Finger authored and Emmanuel Grumbach committed Mar 24, 2015
1 parent 1f16ea2 commit a71aaf6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
op->name, err);
#endif
}
kfree(pieces);
return;

try_again:
Expand Down

0 comments on commit a71aaf6

Please sign in to comment.