diff options
author | Phil Sutter <phil@nwl.cc> | 2017-08-24 11:46:34 +0200 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2017-08-24 14:49:44 -0700 |
commit | 70a6df3962b8448fc9c28d72606828a004ed5b6b (patch) | |
tree | 40f5c804e6a9ca627d6dda2ddfc6b3b405032c1d /tipc | |
parent | 75716932a0af28da207aa57c212794ab28ce9036 (diff) |
tipc/bearer: Prevent NULL pointer dereference
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tipc')
-rw-r--r-- | tipc/bearer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tipc/bearer.c b/tipc/bearer.c index c3d4491f..0d845701 100644 --- a/tipc/bearer.c +++ b/tipc/bearer.c @@ -439,7 +439,7 @@ static int cmd_bearer_enable(struct nlmsghdr *nlh, const struct cmd *cmd, return err; opt = get_opt(opts, "media"); - if (strcmp(opt->val, "udp") == 0) { + if (opt && strcmp(opt->val, "udp") == 0) { err = nl_add_udp_enable_opts(nlh, opts, cmdl); if (err) return err; |