]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix using uninitialised file descriptor 722/head
authorCedric Cellier <[email protected]>
Fri, 25 May 2018 13:46:39 +0000 (15:46 +0200)
committerCedric Cellier <[email protected]>
Fri, 25 May 2018 18:52:01 +0000 (20:52 +0200)
Too quick copy-pasta.

pcap-rpcap.c

index 65e235f06291b57241e6bc07155984178fc7dbe4..f14a220aa315390c07e8eba86fedfbc71168a55f 100644 (file)
@@ -2276,7 +2276,7 @@ pcap_t *pcap_open_rpcap(const char *source, int snaplen, int flags, int read_tim
                goto error;
 
        /* Discard the rest of the message, if there is any. */
-       if (rpcap_discard(pr->rmt_sockctrl, plen, errbuf) == -1)
+       if (rpcap_discard(sockctrl, plen, errbuf) == -1)
                goto error_nodiscard;
 
        /* Set proper fields into the pcap_t struct */
@@ -2314,7 +2314,7 @@ error:
         * We already reported an error; if this gets an error, just
         * drive on.
         */
-       (void)rpcap_discard(pr->rmt_sockctrl, plen, NULL);
+       (void)rpcap_discard(sockctrl, plen, NULL);
 
 error_nodiscard:
        if (!active)