[PATCH 1/2] cache_mngr: Return proper error code if nl_socket_alloc() fails

Thomas Haller thaller at redhat.com
Tue Jun 17 09:44:57 PDT 2014


On Tue, 2014-06-17 at 14:58 +0200, Tobias Klauser wrote:
> 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.
> 


Hi Tobias,


Normally, changing return code is an API break, but in this case I think
it's fine to fix it.

both patches applied as:

https://github.com/thom311/libnl/commit/8f82270cffb7034bc930a9606bc8e1412d2fa73d
https://github.com/thom311/libnl/commit/b6cadfefabe1a029ed4188b67663820d27ba044e



Thank you,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140617/33c505ac/attachment.sig>


More information about the libnl mailing list