httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1725479 - /httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c
Date Tue, 19 Jan 2016 11:43:46 GMT
Author: rjung
Date: Tue Jan 19 11:43:46 2016
New Revision: 1725479

URL: http://svn.apache.org/viewvc?rev=1725479&view=rev
Log:
Silence compiler warning:
'orig_mem' may be used uninitialized in this function

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c?rev=1725479&r1=1725478&r2=1725479&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c Tue Jan 19 11:43:46 2016
@@ -192,7 +192,7 @@ apr_status_t sct_parse(const char *sourc
         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 *sourc
             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) {



Mime
View raw message