summaryrefslogtreecommitdiffhomepage
path: root/ubus.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ubus.c b/ubus.c
index 454b42d..4184301 100644
--- a/ubus.c
+++ b/ubus.c
@@ -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;