diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-04 11:18:09 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-04 11:18:58 -0600 |
commit | 4a10e55f47e4e9310d968f3756a0b66dc65158c9 (patch) | |
tree | c2650a99ac706316fabe7e2f84b72501760fb0bd /src/peer.c | |
parent | global: prefer sizeof(*pointer) when possible (diff) | |
download | wireguard-linux-compat-4a10e55f47e4e9310d968f3756a0b66dc65158c9.tar.xz wireguard-linux-compat-4a10e55f47e4e9310d968f3756a0b66dc65158c9.zip |
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/peer.c')
-rw-r--r-- | src/peer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -30,7 +30,7 @@ peer_create(struct wireguard_device *wg, return NULL; peer = kzalloc(sizeof(*peer), GFP_KERNEL); - if (!peer) + if (unlikely(!peer)) return NULL; peer->device = wg; |