diff options
author | Thomas Haller <thaller@redhat.com> | 2018-02-16 17:43:26 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-02-21 12:08:46 +0100 |
commit | ff7f8b3a79243b62830137853c985900277adb4a (patch) | |
tree | ec9fed530047731c99f5ea2585507dc5a27ce770 /src/platform/nm-netlink.h | |
parent | a7bda2ed12b958fd605e78a2512aa7246046983a (diff) |
netlink: use glib allocator functions for nlmsg_alloc*()
Glib is not out of memory safe, meaning it always aborts the program
when an allocation fails. It is not possible to meaningfully handle
out of memory when using glib.
Replace all allocation functions for netlink message with their glib
counter part and remove the NULL checks.
Diffstat (limited to 'src/platform/nm-netlink.h')
-rw-r--r-- | src/platform/nm-netlink.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/nm-netlink.h b/src/platform/nm-netlink.h index 9c89748009..43bd238663 100644 --- a/src/platform/nm-netlink.h +++ b/src/platform/nm-netlink.h @@ -280,9 +280,9 @@ struct nl_msg *nlmsg_alloc (void); struct nl_msg *nlmsg_alloc_size (size_t max); -struct nl_msg *nlmsg_inherit (struct nlmsghdr *hdr); +struct nl_msg *nlmsg_alloc_inherit (struct nlmsghdr *hdr); -struct nl_msg *nlmsg_convert (struct nlmsghdr *hdr); +struct nl_msg *nlmsg_alloc_convert (struct nlmsghdr *hdr); struct nl_msg *nlmsg_alloc_simple (int nlmsgtype, int flags); |