obj: Check for NULL pointer in nl_object_clone()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
parent
978bb85c7a
commit
d976e2e62b
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue