summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2024-05-06 09:56:46 (GMT)
committerThomas Haller <thaller@redhat.com>2024-05-06 10:03:35 (GMT)
commit3381acef89b218e0c55018119603c5d498880a95 (patch)
tree98cfa47e21ce959b1cae71caf1b7b827ee97dc2d /include
parent32cb9f392c77aa4b8ea0a05f6876021a4816814d (diff)
downloadlibnl-3381acef89b218e0c55018119603c5d498880a95.zip
libnl-3381acef89b218e0c55018119603c5d498880a95.tar.gz
libnl-3381acef89b218e0c55018119603c5d498880a95.tar.bz2
cache: use cleanup attribute in nl_cache_mngr_alloc_ex()
No "goto errout".
Diffstat (limited to 'include')
-rw-r--r--include/nl-aux-core/nl-core.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/nl-aux-core/nl-core.h b/include/nl-aux-core/nl-core.h
index 5198296..f75df5c 100644
--- a/include/nl-aux-core/nl-core.h
+++ b/include/nl-aux-core/nl-core.h
@@ -44,6 +44,12 @@ void nl_socket_free(struct nl_sock *);
_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_sock *, _nl_auto_nl_socket_fcn,
nl_socket_free);
+struct nl_cache_mngr;
+void nl_cache_mngr_free(struct nl_cache_mngr *mngr);
+#define _nl_auto_nl_cache_mngr _nl_auto(_nl_auto_nl_cache_mngr_fcn)
+_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_cache_mngr *, _nl_auto_nl_cache_mngr_fcn,
+ nl_cache_mngr_free);
+
struct nl_addr *nl_addr_build(int, const void *, size_t);
static inline struct nl_addr *_nl_addr_build(int family, const void *buf)