invalid pointer was passed to free()
[project/procd.git] / debug.c
diff --git a/debug.c b/debug.c
index 7d7798b..91e874f 100644 (file)
--- a/debug.c
+++ b/debug.c
@@ -29,7 +29,7 @@ void debug_init(void)
        regex_t pat_cmdline;
        regmatch_t matches[2];
 
-       if (!fd)
+       if (fd < 0)
                return;
 
        r = read(fd, line, sizeof(line) - 1);