mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
Merge pull request #716 from rical/fix-confd-cont-double-free
confd: fix double free of container hostname
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user