linux/drivers/staging/rtl8192e
Jesper Juhl 337503431a Staging, rtl8192e, softmac: remove redundant memset and fix mem leak
In drivers/staging/rtl8192e/rtllib_softmac.c::rtllib_rx_assoc_resp()
we allocate memory for 'network' with kzalloc() and then proceed to
zero the already zeroed mem we got from kzalloc() with
memset(). That's redundant, so remove the memset()

We also fail to kfree() the memory we allocated for 'network' if we do not enter

  if (ieee->current_network.qos_data.supported == 1) {

and the variable then goes out of scope.

To fix that I simply moved the kfree() that was inside that 'if'
statement to instead be just after it. It then covers both the case
where we take the branch and when we don't.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 17:21:43 -08:00
..
rtl8192e staging/rtl8192e: Convert to lib80211_crypt_info 2011-12-22 13:48:59 -08:00
dot11d.c rtl8192e: Rename clashing symbols 2011-11-30 14:16:42 -08:00
dot11d.h rtl8192e: Rename clashing symbols 2011-11-30 14:16:42 -08:00
Kconfig staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
license From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
Makefile staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
rtl819x_BA.h staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part V 2011-08-25 10:05:10 -07:00
rtl819x_BAProc.c rtl8192e: create generic rtllib_debug.h 2011-11-30 19:44:09 +09:00
rtl819x_HT.h staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part V 2011-08-25 10:05:10 -07:00
rtl819x_HTProc.c rtl8192e: Rename clashing symbols 2011-11-30 14:16:42 -08:00
rtl819x_Qos.h staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part VI 2011-08-25 10:05:11 -07:00
rtl819x_TS.h staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part VI 2011-08-25 10:05:11 -07:00
rtl819x_TSProc.c rtl8192e: Export symbols 2011-11-30 19:45:26 +09:00
rtllib_crypt_ccmp.c staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
rtllib_crypt_tkip.c staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
rtllib_crypt_wep.c staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
rtllib_crypt.c staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
rtllib_crypt.h staging/rtl8192e: Convert to lib80211_crypt_info 2011-12-22 13:48:59 -08:00
rtllib_debug.h rtl8192e: create generic rtllib_debug.h 2011-11-30 19:44:09 +09:00
rtllib_endianfree.h staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XI 2011-08-25 10:05:13 -07:00
rtllib_module.c staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
rtllib_rx.c drivers/staging: adjust double test 2012-02-09 09:13:55 -08:00
rtllib_softmac_wx.c rtl8192e: Export symbols 2011-11-30 19:45:26 +09:00
rtllib_softmac.c Staging, rtl8192e, softmac: remove redundant memset and fix mem leak 2012-02-15 17:21:43 -08:00
rtllib_tx.c staging/rtl8192e: Convert to lib80211_crypt_info 2011-12-22 13:48:59 -08:00
rtllib_wx.c staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
rtllib.h staging/rtl8192e: Register against lib80211 2011-12-22 13:48:59 -08:00
TODO rtl8192e: Add a TODO 2011-08-23 20:04:16 -05:00