From: Colin Ian King Date: Mon, 28 Oct 2013 12:58:12 +0000 (+0000) Subject: rtlwifi: fix null dereference on efuse_word on kmalloc fail returns NULL X-Git-Tag: v3.13-rc1~33^2~27^2^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=450991fd2f9d362562c69b2e70832b2ecb7624cb;p=pandora-kernel.git rtlwifi: fix null dereference on efuse_word on kmalloc fail returns NULL kmalloc on efuse_word can return null, leading to free'ing of elements in efuse_word on the error exit path even though it has not been allocated. Instead, don't free the elements of efuse_word if kmalloc failed. Also, kmalloc of any of the arrays in efuse_word[] can also fail, leading to undefined contents in the remaining elements leading to problems when free'ing these elements later on. So kzalloc efuse_word to ensure the kfree on the remaining elements won't cause breakage. Signed-off-by: Colin Ian King Signed-off-by: John W. Linville --- Reading git-diff-tree failed