]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl/ckch: return from ckch_conf_clean() when conf is NULL
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 12 Feb 2025 13:48:38 +0000 (14:48 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 17 Feb 2025 17:26:37 +0000 (18:26 +0100)
ckch_conf_clean() mustn't be executed when the argument is NULL, this
will keep the API more consistant like any free() function.

src/ssl_ckch.c

index 0cbc984dc581637a4e18a66d815c69a33fd0f1e8..90887c55bc067a86d68285f75ba764d29c23e184 100644 (file)
@@ -4841,6 +4841,9 @@ out:
 /* freeing the content of a ckch_conf structure */
 void ckch_conf_clean(struct ckch_conf *conf)
 {
+       if (!conf)
+               return;
+
        free(conf->crt);
        free(conf->key);
        free(conf->ocsp);