瀏覽代碼

iwlwifi: Fix memory leak in iwl_req_fw_callback()

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>
Larry Finger 10 年之前
父節點
當前提交
a71aaf6672
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/wireless/iwlwifi/iwl-drv.c

+ 1 - 0
drivers/net/wireless/iwlwifi/iwl-drv.c

@@ -1257,6 +1257,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
 				op->name, err);
 				op->name, err);
 #endif
 #endif
 	}
 	}
+	kfree(pieces);
 	return;
 	return;
 
 
  try_again:
  try_again: