projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb9beaa
)
alias: Fix possible segfault
author
Hans Dedecker
<dedeckeh@gmail.com>
Mon, 1 Feb 2016 09:56:28 +0000
(10:56 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 1 Feb 2016 10:09:58 +0000
(11:09 +0100)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
alias.c
patch
|
blob
|
history
diff --git
a/alias.c
b/alias.c
index 01bec41f309f2c3cbef433491270455e83ee80c1..1f23da08ac5e66eab4f2b6569013f7fc0d098673 100644
(file)
--- a/
alias.c
+++ b/
alias.c
@@
-112,6
+112,9
@@
alias_device_create(const char *name, struct blob_attr *attr)
struct alias_device *alias;
alias = calloc(1, sizeof(*alias) + strlen(name) + 1);
+ if (!alias)
+ return NULL;
+
strcpy(alias->name, name);
alias->dev.set_state = alias_device_set_state;
alias->dev.hidden = true;