aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/libpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-06-04 21:58:55 +0000
committerGuy Harris <guy@alum.mit.edu>2005-06-04 21:58:55 +0000
commit7b9c1a62a7f30cc7016407c6401cccff8c8b85a9 (patch)
treef0a8353614e3f940e317fdf480a11e512d419fb8 /wiretap/libpcap.c
parent41b7272c0e10f27d5286e20bd11742314d6105db (diff)
Fix some more leaks in error returns from open routines (if the open can
fail after the private data is allocated, you have to free the private data). The file header in nettl files is 128 bytes - use a #define for it, and also a #define for the magic number size. svn path=/trunk/; revision=14553
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r--wiretap/libpcap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index 7147b28b38..97c14fcf78 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -992,6 +992,7 @@ int libpcap_open(wtap *wth, int *err, gchar **err_info)
*err = WTAP_ERR_UNSUPPORTED_ENCAP;
*err_info = g_strdup_printf("pcap: network type %u unknown or unsupported",
hdr.network);
+ g_free(wth->capture.pcap);
return -1;
}
}