nmp-netns: fix error handling
authorLubomir Rintel <lkundrak@v3.sk>
Mon, 14 Mar 2016 16:09:11 +0000 (17:09 +0100)
committerLubomir Rintel <lkundrak@v3.sk>
Tue, 15 Mar 2016 08:00:03 +0000 (09:00 +0100)
commit4e0968182c7a23404d0f480c32f5c90865177163
treeaf116b7c0b29f2dda53e76a3f98a1734c55a15ef
parentff97494e78e9bc39f0b2ee7bfc7bfd6b9bde95c7
nmp-netns: fix error handling

GError is not used, the error branch would always result in NULL dereference.

Also, check for the result being zero for clarity -- it's the only allowed
success indication.

CID 75365 (#3 of 3): Explicit null dereferenced (FORWARD_NULL)
12. var_deref_op: Dereferencing null pointer error.
src/platform/nmp-netns.c