From: Rainer Jung Date: Tue, 19 Jan 2016 11:43:46 +0000 (+0000) Subject: Silence compiler warning: X-Git-Tag: 2.5.0-alpha~2376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78823e7b69fc98227bdf743d3e056aacd3b5ba5e;p=thirdparty%2Fapache%2Fhttpd.git Silence compiler warning: 'orig_mem' may be used uninitialized in this function git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725479 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_ct_sct.c b/modules/ssl/ssl_ct_sct.c index f55a3e895fa..7f11a9ba1cf 100644 --- a/modules/ssl/ssl_ct_sct.c +++ b/modules/ssl/ssl_ct_sct.c @@ -192,7 +192,7 @@ apr_status_t sct_parse(const char *source, apr_size_t avail; int der_length; unsigned char *mem; - unsigned char *orig_mem; + unsigned char *orig_mem = NULL; der_length = i2d_X509(cc->leaf, NULL); if (der_length < 0) { @@ -248,7 +248,9 @@ apr_status_t sct_parse(const char *source, ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(02773) "Failed to reconstruct signed data for " "SCT"); - free(orig_mem); + if (orig_mem != NULL) { + free(orig_mem); + } } else { if (avail != 0) {