3d295f5e5eb2408b19db28e4ac17c5da9f4b7812
[openwrt.git] / openwrt / package / wpa_supplicant / patches / driver_broadcom-memleak.patch
1 Fixes some memory leaks in driver_broadom.c
2
3 http://openwrt.org/forum/viewtopic.php?pid=8217#p8217
4
5 Thanks Greg (framer99)
6
7 --- wpa_supplicant-0.3.8/driver_broadcom.c.orig 2005-01-22 05:35:13.000000000 +0100
8 +++ wpa_supplicant-0.3.8/driver_broadcom.c 2005-06-10 08:50:14.000000000 +0200
9 @@ -289,6 +289,7 @@
10 wwh->type);
11 break;
12 }
13 + free(data.assoc_info.resp_ies);
14 }
15
16 static void * wpa_driver_broadcom_init(void *ctx, const char *ifname)
17 @@ -449,8 +450,10 @@
18 wsr->count = 0;
19
20 if (broadcom_ioctl(drv, WLC_SCAN_RESULTS, buf, WLC_IOCTL_MAXLEN) <
21 - 0)
22 + 0) {
23 + free(buf);
24 return -1;
25 + }
26
27 memset(results, 0, max_size * sizeof(struct wpa_scan_result));
28
29 @@ -490,6 +493,7 @@
30 wpa_printf(MSG_MSGDUMP, "Received %d bytes of scan results (%d BSSes)",
31 wsr->buflen, ap_num);
32
33 + free(buf);
34 return ap_num;
35 }
36
This page took 0.063612 seconds and 3 git commands to generate.