obj: Check for NULL pointer in nl_object_clone()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Thomas Graf 2013-10-22 14:16:43 +02:00
parent 978bb85c7a
commit d976e2e62b

View file

@ -114,6 +114,9 @@ struct nl_object *nl_object_clone(struct nl_object *obj)
int doff = offsetof(struct nl_derived_object, data);
int size;
if (!obj)
return NULL;
new = nl_object_alloc(ops);
if (!new)
return NULL;