Possible resource leak in pcap-linux.c

(cherry picked from commit 5e13e2cc68af4265d6cab6096ce7b152dc36d1f8)
diff --git a/pcap-linux.c b/pcap-linux.c
index 9c14764..18c71ea 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -1618,8 +1618,8 @@
 				}
 			}
 			fclose(fh);
-			free(pathstr);
 		}
+		free(pathstr);
 	}
 
 #ifdef ETHTOOL_GLINK