Commit d0da5b0e authored by Doug MacEachern's avatar Doug MacEachern
Browse files

plug leak in newish ssl_asn1_table_set() function


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@93648 13f79535-47bb-0310-9956-ffa450edef68
parent 5c36f8ce
Loading
Loading
Loading
Loading
+3 −1
Changes for ssl_engine_ds.c: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -212,10 +212,12 @@ 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)) {
    if (asn1) {
        if (asn1->nData != length) {
            free(asn1->cpData); /* XXX: realloc? */
            asn1->cpData = NULL;
        }
    }
    else {
        asn1 = malloc(sizeof(*asn1));
        asn1->source_mtime = 0; /* used as a note for encrypted private keys */