]> granicus.if.org Git - apache/commitdiff
plug leak in newish ssl_asn1_table_set() function
authorDoug MacEachern <dougm@apache.org>
Thu, 28 Feb 2002 19:11:31 +0000 (19:11 +0000)
committerDoug MacEachern <dougm@apache.org>
Thu, 28 Feb 2002 19:11:31 +0000 (19:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93648 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_ds.c

index 39696fa285a260dd152fc1f9c80592fb8ebeecb7..38dbc6799dc30d44c02a7ea5776f59510f23007a 100644 (file)
@@ -212,9 +212,11 @@ unsigned char *ssl_asn1_table_set(apr_hash_t *table,
      * reuse as much of the already malloc-ed data
      * as possible.
      */
-    if (asn1 && (asn1->nData != length)) {
-        free(asn1->cpData); /* XXX: realloc? */
-        asn1->cpData = NULL;
+    if (asn1) {
+        if (asn1->nData != length) {
+            free(asn1->cpData); /* XXX: realloc? */
+            asn1->cpData = NULL;
+        }
     }
     else {
         asn1 = malloc(sizeof(*asn1));