aboutsummaryrefslogtreecommitdiff
path: root/pcap-rpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-10-07 14:10:51 -0700
committerGuy Harris <guy@alum.mit.edu>2017-10-07 14:10:51 -0700
commit9f1d11b218f97bf40c64245dc01c4c53b83e1d75 (patch)
treeaa1db834874f087cf511ce4f9345a21122b45a32 /pcap-rpcap.c
parent3df5c4d3d854ce8c9ad733bc9c018e056fb93404 (diff)
Free an address list once we're done with it.
This fixes Coverity CID 1419013.
Diffstat (limited to 'pcap-rpcap.c')
-rw-r--r--pcap-rpcap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pcap-rpcap.c b/pcap-rpcap.c
index 09ac5000..1862a30e 100644
--- a/pcap-rpcap.c
+++ b/pcap-rpcap.c
@@ -2563,8 +2563,10 @@ SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *
if ((sockmain = sock_open(addrinfo, SOCKOPEN_SERVER, 1, errbuf, PCAP_ERRBUF_SIZE)) == -1)
{
SOCK_ASSERT(errbuf, 1);
+ freeaddrinfo(addrinfo);
return -2;
}
+ freeaddrinfo(addrinfo);
/* Connection creation */
fromlen = sizeof(struct sockaddr_storage);