summaryrefslogtreecommitdiffhomepage
path: root/src/netlink.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-04 11:18:09 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-04 11:18:58 -0600
commit4a10e55f47e4e9310d968f3756a0b66dc65158c9 (patch)
treec2650a99ac706316fabe7e2f84b72501760fb0bd /src/netlink.c
parent4ed60c09ee40f22f99afd59f3ff94866b7aa0cc4 (diff)
global: always find OOM unlikely
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 98848c9..0bd2b97 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -175,9 +175,9 @@ static int get_device_start(struct netlink_callback *cb)
if (ret < 0)
return ret;
- cb->args[2] =
- (long)kzalloc(sizeof(struct allowedips_cursor), GFP_KERNEL);
- if (!cb->args[2])
+ cb->args[2] = (long)kzalloc(sizeof(struct allowedips_cursor),
+ GFP_KERNEL);
+ if (unlikely(!cb->args[2]))
return -ENOMEM;
wg = lookup_interface(attrs, cb->skb);
if (IS_ERR(wg)) {