]> The Tcpdump Group git mirrors - libpcap/commitdiff
Free addrinfo in the child after forking.
authorGuy Harris <[email protected]>
Sun, 21 Jan 2018 18:12:38 +0000 (10:12 -0800)
committerGuy Harris <[email protected]>
Sun, 21 Jan 2018 18:12:38 +0000 (10:12 -0800)
This should fix Coverity CID 1418993.

rpcapd/rpcapd.c

index af89eca6063a586a1c4298f63e0284b373b557f1..cb5d4a0c5b22f0be18df75c6ccb178f7d48c732b 100755 (executable)
@@ -409,6 +409,7 @@ void main_startup(void)
 #else
                        if ((pid = fork()) == 0)        // I am the child
                        {
+                               freeaddrinfo(addrinfo);
                                main_passive((void *) socktemp);
                                return;
                        }