]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: use free_and_replace() 9026/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 18 May 2018 08:35:23 +0000 (17:35 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 18 May 2018 08:35:23 +0000 (17:35 +0900)
src/core/load-fragment.c

index 53fe7d4b8b28422509e8442ff65a75cb095a9501..1b6a57cf995dba29cb4b5aca0b4a18ee0a2bc93e 100644 (file)
@@ -812,8 +812,7 @@ int config_parse_socket_bindtodevice(
         } else
                 n = NULL;
 
-        free(s->bind_to_device);
-        s->bind_to_device = n;
+        free_and_replace(s->bind_to_device, n);
 
         return 0;
 }