diff options
author | Thomas Haller <thaller@redhat.com> | 2018-12-23 14:39:22 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-01-09 16:46:41 +0100 |
commit | 2e48f6419ffaff960548f40e0a54303e35b9a7bb (patch) | |
tree | eb541636b01a7247a9b981f74ebe21983ecae204 /src/platform/nm-netlink.h | |
parent | e5fb1dd6e7fff3827eca0ec79e890b21ed96284d (diff) |
netlink: don't heap allocate struct ucred during nla_recv()
Instead, fill a preallocated output buffer provided by the caller.
Diffstat (limited to 'src/platform/nm-netlink.h')
-rw-r--r-- | src/platform/nm-netlink.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/platform/nm-netlink.h b/src/platform/nm-netlink.h index 2fbddff4cf..f1f8394052 100644 --- a/src/platform/nm-netlink.h +++ b/src/platform/nm-netlink.h @@ -416,8 +416,11 @@ int nl_socket_add_memberships (struct nl_sock *sk, int group, ...); int nl_connect (struct nl_sock *sk, int protocol); -int nl_recv (struct nl_sock *sk, struct sockaddr_nl *nla, - unsigned char **buf, struct ucred **creds); +int nl_recv (struct nl_sock *sk, + struct sockaddr_nl *nla, + unsigned char **buf, + struct ucred *out_creds, + gboolean *out_creds_has); int nl_send (struct nl_sock *sk, struct nl_msg *msg); |