projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18aa062
)
tunnel: Fix possible segfault
author
Hans Dedecker
<dedeckeh@gmail.com>
Mon, 1 Feb 2016 09:56:19 +0000
(10:56 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 1 Feb 2016 10:09:57 +0000
(11:09 +0100)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
tunnel.c
patch
|
blob
|
history
diff --git
a/tunnel.c
b/tunnel.c
index 524fd435e3d1f3178cc34cd1c45b81f62596c5d1..4a6c4093f3fa96bf26ca652c1ed71c4f7a8533ef 100644
(file)
--- a/
tunnel.c
+++ b/
tunnel.c
@@
-67,6
+67,9
@@
tunnel_create(const char *name, struct blob_attr *attr)
struct device *dev;
tun = calloc(1, sizeof(*tun));
+ if (!tun)
+ return NULL;
+
dev = &tun->dev;
device_init(dev, &tunnel_device_type, name);
tun->set_state = dev->set_state;