diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-02-25 00:02:26 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-02-25 00:02:26 +0000 |
commit | f5661a997006a92784c236a02bf5b521989947b9 (patch) | |
tree | 9a913aee66b28ef7def8569c90adbd8ecb1967c4 /capture-pcap-util.c | |
parent | e6fb19409437f8ebd79f664ef39a91ac1a536565 (diff) |
an error return was missing a pcap_close() call
svn path=/trunk/; revision=17404
Diffstat (limited to 'capture-pcap-util.c')
-rw-r--r-- | capture-pcap-util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/capture-pcap-util.c b/capture-pcap-util.c index c52e8cf95d..1499696756 100644 --- a/capture-pcap-util.c +++ b/capture-pcap-util.c @@ -366,8 +366,10 @@ get_pcap_linktype_list(const char *devname, char *err_buf) deflt = get_pcap_linktype(pch, devname); #ifdef HAVE_PCAP_LIST_DATALINKS nlt = pcap_list_datalinks(pch, &linktypes); - if (nlt == 0 || linktypes == NULL) + if (nlt == 0 || linktypes == NULL) { + pcap_close(pch); return NULL; + } for (i = 0; i < nlt; i++) { data_link_info = create_data_link_info(linktypes[i]); |