diff options
author | Susant Sahani <ssahani@vmware.com> | 2019-10-31 21:55:48 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-11-01 11:40:32 +0900 |
commit | 0cc9e972ff7a90ad0640b14039d48136489694c0 (patch) | |
tree | aaaeb6c8177eaf72c09a6df4d46e8a2a58d45c09 /src/libsystemd-network/sd-dhcp-server.c | |
parent | c0619079cc9f3c81da24b38f803e7aadb85be953 (diff) | |
download | systemd-0cc9e972ff7a90ad0640b14039d48136489694c0.tar.gz |
network: DHCP server remove duplicate free
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-server.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-server.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 0f000f5055..3316c8bda4 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -151,10 +151,8 @@ _public_ int sd_dhcp_raw_option_new(uint8_t type, char *data, size_t length, sd_ .type = type, }; - if (!p->data) { - free(p); + if (!p->data) return -ENOMEM; - } *ret = TAKE_PTR(p); return 0; |