summaryrefslogtreecommitdiff
blob: b61025d25b6ee3e6a03e4bb20b427ae1e2b33d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/src/capture.c
+++ b/src/capture.c
@@ -191,7 +191,7 @@
 
     // Reopen tty for ncurses after pcap have used stdin
     if (!strncmp(infile, "/dev/stdin", 10)) {
-        if (!(stdin = freopen("/dev/tty", "r", stdin))) {
+        if (!(fstdin = freopen("/dev/tty", "r", stdin))) {
             fprintf(stderr, "Failed to reopen tty while using stdin for capture.");
             return 1;
         }