Merge pull request #716 from rical/fix-confd-cont-double-free

confd: fix double free of container hostname
This commit is contained in:
Joachim Wiberg
2024-10-16 06:43:29 +02:00
committed by GitHub
+2 -4
View File
@@ -52,12 +52,10 @@ static int add(const char *name, struct lyd_node *cif)
if ((string = lydx_get_cattr(cif, "hostname"))) {
char *fmt = (char *)string;
if (hostnamefmt(&confd, &fmt)) {
if (hostnamefmt(&confd, &fmt))
ERRNO("%s: failed setting custom hostname", name);
} else {
else
fprintf(fp, " --hostname %s", fmt);
free(fmt);
}
}
if (lydx_is_enabled(cif, "read-only"))