]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - tools/bpf/bpf_dbg.c
perf build: Add detection of java-11-openjdk-devel package
[mirror_ubuntu-bionic-kernel.git] / tools / bpf / bpf_dbg.c
index 4f254bcc442347ffb529925fed70d7e299d50773..61b9aa5d641529666c2f7695fc6c1804e86899ce 100644 (file)
@@ -1063,7 +1063,7 @@ static int cmd_load_pcap(char *file)
 
 static int cmd_load(char *arg)
 {
-       char *subcmd, *cont, *tmp = strdup(arg);
+       char *subcmd, *cont = NULL, *tmp = strdup(arg);
        int ret = CMD_OK;
 
        subcmd = strtok_r(tmp, " ", &cont);
@@ -1073,7 +1073,10 @@ static int cmd_load(char *arg)
                bpf_reset();
                bpf_reset_breakpoints();
 
-               ret = cmd_load_bpf(cont);
+               if (!cont)
+                       ret = CMD_ERR;
+               else
+                       ret = cmd_load_bpf(cont);
        } else if (matches(subcmd, "pcap") == 0) {
                ret = cmd_load_pcap(cont);
        } else {