mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-06 01:36:22 +00:00
tipc/bearer: Prevent NULL pointer dereference
Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
75716932a0
commit
70a6df3962
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user