Search Linux Wireless

Re: Small cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-    if ((ai->APList == NULL) &&
-        (ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL)) == NULL)
+    if (!ai->APList)
+        ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL);
+    if (!ai->APList)
         return -ENOMEM;
-    if ((ai->SSID == NULL) &&
-        (ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL)) == NULL)
+    if (!ai->SSID)
+        ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL);
+    if (!ai->SSID)
         return -ENOMEM;

Would you mind sending another patch which would fix the potential leak?

Sorry, ignore this.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux