projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
vlan: Fix possible segfault
[project/netifd.git]
/
vlan.c
diff --git
a/vlan.c
b/vlan.c
index
8e7141f
..
ac434ce
100644
(file)
--- a/
vlan.c
+++ b/
vlan.c
@@
-120,6
+120,8
@@
static struct device *get_vlan_device(struct device *dev, int id, bool create)
D(DEVICE, "Create vlan device '%s.%d'\n", dev->ifname, id);
vldev = calloc(1, sizeof(*vldev));
+ if (!vldev)
+ return NULL;
vldev->id = id;
vlan_dev_set_name(vldev, dev);