]> granicus.if.org Git - libnl/commit
cache_mngr: Return proper error code if nl_socket_alloc() fails
authorTobias Klauser <tklauser@distanz.ch>
Tue, 17 Jun 2014 12:58:09 +0000 (14:58 +0200)
committerThomas Haller <thaller@redhat.com>
Tue, 17 Jun 2014 15:33:26 +0000 (17:33 +0200)
commit8f82270cffb7034bc930a9606bc8e1412d2fa73d
tree429081ead32bbd5fa2b2fc15b9fa64a2b0527991
parentfeda705426c4a1d24aff9d6a0b7a264df226ae10
cache_mngr: Return proper error code if nl_socket_alloc() fails

If nl_socket_alloc() failes in nl_cache_mngr_alloc() we would currently
return 0 due to the previous assignment of the err variable, even though
the failed allocation is an error condition. Fix this by setting err to
-NLE_NOMEM if nl_socket_alloc() fails.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
lib/cache_mngr.c