diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-11-26 01:57:16 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-11-26 03:28:27 +0100 |
commit | 766417bd763db913efdd9c48442b1094c23d7042 (patch) | |
tree | 85434bc478febdaf8e3659be1cab91377ae32247 /src/libsystemd | |
parent | sd-netlink: fix possible use-after-free (diff) | |
download | systemd-766417bd763db913efdd9c48442b1094c23d7042.tar.xz systemd-766417bd763db913efdd9c48442b1094c23d7042.zip |
sd-netlink: fix segfault
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-netlink/sd-netlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index 1202fe10a5..ec1035fdd1 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -593,7 +593,8 @@ int sd_netlink_read( return r; if (type == NLMSG_DONE) { - *ret = NULL; + if (ret) + *ret = NULL; return 0; } |