network: DHCP server remove duplicate free
authorSusant Sahani <ssahani@vmware.com>
Thu, 31 Oct 2019 20:55:48 +0000 (21:55 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Nov 2019 02:40:32 +0000 (11:40 +0900)
src/libsystemd-network/sd-dhcp-server.c

index 0f000f5..3316c8b 100644 (file)
@@ -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;