diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-02-01 10:56:17 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-02-01 11:09:57 +0100 |
commit | 1eac490bd39bcf8b48795fe0555b4451ba2bf1dd (patch) | |
tree | 9c8069c72decffffdd4ced1194e7ca8bcd3961bf /ubus.c | |
parent | 11797342f8ab344850893a3857210d1cd0fbd285 (diff) |
ubus: Fix possible segfault
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -969,6 +969,9 @@ static void netifd_add_iface_object(void) int i; methods = calloc(1, sizeof(iface_object_methods)); + if (!methods) + return; + memcpy(methods, iface_object_methods, sizeof(iface_object_methods)); iface_object.methods = methods; |