tree-wide: use free_and_str*dup() more

This commit is contained in:
David Tardon
2023-05-24 15:03:55 +02:00
parent d6f2cd671c
commit a73e5eb94c
3 changed files with 9 additions and 12 deletions
+3 -4
View File
@@ -712,10 +712,9 @@ int veth_extra_parse(char ***l, const char *p) {
if (r < 0)
return r;
if (r == 0 || !ifname_valid(b)) {
free(b);
b = strdup(a);
if (!b)
return -ENOMEM;
r = free_and_strdup(&b, a);
if (r < 0)
return r;
}
if (p)