Fix kernel panic on NULL pointer deref w/ certain ktrace commands, allow -c -f.
[dragonfly.git] / usr.bin / ktrace / ktrace.c
index bfc2eb9..261d4fb 100644 (file)
@@ -110,7 +110,7 @@ main(int argc, char **argv)
        argv += optind;
        argc -= optind;
        
-       if ((pidset && *argv) || (!pidset && !*argv))
+       if ((pidset && *argv) || (!pidset && clear == NOTSET && !*argv))
                usage();
                        
        if (inherit)