]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: acme: ckch_conf_acme_init() when no filename
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 11 Apr 2025 21:44:13 +0000 (23:44 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 11 Apr 2025 23:39:03 +0000 (01:39 +0200)
Does not try to strdup the configuration filename if there is none.

No backport needed.

src/acme.c

index be8e58d5ba251d61bb161c7d55ef59ba429501ca..5e1ea927cf7c7083289e52f24f6767c2daa1248b 100644 (file)
@@ -99,7 +99,8 @@ int ckch_conf_acme_init(void *value, char *buf, struct ckch_data *d, int cli, co
        }
 
        if (cfg->linenum == 0) {
-               cfg->filename = strdup(filename);
+               if (filename)
+                       cfg->filename = strdup(filename);
                 /* store the linenum as a negative value because is the one of
                  * the crt-store, not the one of the section. It will be replace
                  * by the one of the section once initialized