diff options
author | David S. Miller <davem@davemloft.net> | 2018-05-04 15:58:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-04 15:58:56 +0200 |
commit | a7b15ab887e5b8e9803136b5a4a0008d7a3dea86 (patch) | |
tree | ca5342d29badb2a3cce2a353b786c8ab4a993c1e /tools/bpf | |
parent | Merge branch 'sh_eth-complain-on-access-to-unimplemented-TSU-registers' (diff) | |
parent | Merge tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
download | linux-a7b15ab887e5b8e9803136b5a4a0008d7a3dea86.tar.xz linux-a7b15ab887e5b8e9803136b5a4a0008d7a3dea86.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes in selftests Makefile.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpf_dbg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/bpf/bpf_dbg.c b/tools/bpf/bpf_dbg.c index 4f254bcc4423..61b9aa5d6415 100644 --- a/tools/bpf/bpf_dbg.c +++ b/tools/bpf/bpf_dbg.c @@ -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 { |