mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2025-02-11 13:45:27 +00:00
lib: fix error code from nfnl_exp_build_message()
Otherwise we return success but don't actually set the output result. This can lead to a crash, in case of out-of-memory. Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1606988
This commit is contained in:
parent
34708e2ef0
commit
f3d5c44d21
@ -492,6 +492,8 @@ static int nfnl_exp_build_message(const struct nfnl_exp *exp, int cmd, int flags
|
||||
return 0;
|
||||
|
||||
nla_put_failure:
|
||||
err = -NLE_NOMEM;
|
||||
|
||||
err_out:
|
||||
nlmsg_free(msg);
|
||||
return err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user