diff options
author | Thomas Haller <thaller@redhat.com> | 2023-11-27 21:39:20 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-11-29 16:03:40 +0100 |
commit | db42483501840497dda70571cf4d51f424338503 (patch) | |
tree | ea56fabb076186a6069946334da3c370dfdb0c9b | |
parent | 9c97deff90b7c0bf2d0c7006bffc2a95cc4fbfa6 (diff) | |
download | libnl-db42483501840497dda70571cf4d51f424338503.tar.gz |
xfrm: fix error code for NLE_ENOMEM in xfrmnl_ae_parse()
These internal error codes are probably a bad idea. However, at least be
consistent about it.
Fixes: 77bbf2270ce7 ('xfrm: fix an unintialized return value on memory allocation error in xfrmnl_ae_parse()')
-rw-r--r-- | lib/xfrm/ae.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xfrm/ae.c b/lib/xfrm/ae.c index 716e4e65..288ff3d1 100644 --- a/lib/xfrm/ae.c +++ b/lib/xfrm/ae.c @@ -583,7 +583,7 @@ int xfrmnl_ae_parse(struct nlmsghdr *n, struct xfrmnl_ae **result) uint32_t len = sizeof (struct xfrmnl_replay_state_esn) + (sizeof (uint32_t) * esn->bmp_len); if ((ae->replay_state_esn = calloc (1, len)) == NULL) { - err = -ENOMEM; + err = -NLE_ENOMEM; goto errout; } ae->replay_state_esn->oseq = esn->oseq; |