]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: don't leak memory on allocation failure
authorJohannes Berg <johannes.berg@intel.com>
Tue, 28 Feb 2017 15:44:16 +0000 (16:44 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 25 Apr 2017 19:48:56 +0000 (22:48 +0300)
commit3ce4ce8ea77f42c5cb93649002542f66c2b8163b
tree606af8a6829af9b31e7f0ac7f074f7ab5cf2d485
parent00b940373b7887bb66374da3c5a06cab37ec9a31
iwlwifi: don't leak memory on allocation failure

If we fail to allocate the small chunk of memory for the
pieces of the firmware file, we leak the whole firmware
image instead...

Since the allocation failure is really unlikely, just bail
out at that point instead.

Remove the error message at the label since we now (and
actually have been) use it for various reasons.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-drv.c