]> The Tcpdump Group git mirrors - libpcap/commitdiff
Possible resource leak in pcap-linux.c
authorMichal Ruprich <[email protected]>
Tue, 27 Jul 2021 08:00:00 +0000 (10:00 +0200)
committerGuy Harris <[email protected]>
Wed, 20 Oct 2021 05:13:27 +0000 (22:13 -0700)
(cherry picked from commit 5e13e2cc68af4265d6cab6096ce7b152dc36d1f8)

pcap-linux.c

index 9c1476440cfb5e88d4c3632c118dc0a31a050986..18c71ea9ef66f05f8f3f484f17af925c3bb8374a 100644 (file)
@@ -1618,8 +1618,8 @@ get_if_flags(const char *name, bpf_u_int32 *flags, char *errbuf)
                                }
                        }
                        fclose(fh);
-                       free(pathstr);
                }
+               free(pathstr);
        }
 
 #ifdef ETHTOOL_GLINK