From: Phil Sutter Date: Thu, 24 Aug 2017 09:46:34 +0000 (+0200) Subject: tipc/bearer: Prevent NULL pointer dereference X-Git-Tag: v4.13.0~32 X-Git-Url: https://git.proxmox.com/?p=mirror_iproute2.git;a=commitdiff_plain;h=70a6df3962b8448fc9c28d72606828a004ed5b6b tipc/bearer: Prevent NULL pointer dereference Signed-off-by: Phil Sutter --- 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;