Commit dfa4ede4 authored by Hans Dedecker's avatar Hans Dedecker

interface: fix return code of __interface_add()

For dynamic interfaces don't return false if vlist_find returns NULL as
the calling function will try to free iface in case of an error which has
already been freed in interface_change_config()
Signed-off-by: default avatarHans Dedecker <>
parent a82a8f65
......@@ -922,11 +922,9 @@ static bool __interface_add(struct interface *iface, struct blob_attr *config, b
iface = vlist_find(&interfaces, name, iface, node);
if (!iface)
return false;
/* Don't delete dynamic interface on reload */
iface->node.version = -1;
if (iface)
iface->node.version = -1;
return true;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment