]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-linux.c
Free the memory allocated for the Wireless Extensions private ioctl list
[libpcap] / pcap-linux.c
index a7b4d3d04732fa2d7371c20f88c671d9b2096d9f..d4910c25e6cb5493f79faa6c6b2aa9c13cdf7bac 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.12 2008-04-04 20:52:00 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.13 2008-04-07 00:39:20 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -2329,6 +2329,7 @@ enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device)
        if (ioctl(sock_fd, SIOCGIWPRIV, &ireq) == -1) {
                snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
                    "%s: SIOCGIWPRIV: %s", device, pcap_strerror(errno));
+               free(priv);
                return PCAP_ERROR;
        }
 
@@ -2481,6 +2482,7 @@ enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device)
                        }
                }
        }
+       free(priv);
 
        /*
         * XXX - ipw3945?  islism?