SetBlob: free rgSetBlob on error path
[openssl.git] / crypto / asn1 / a_set.c
index d726c8d3a87c6fd18ce064473e85e9a59be8c6ad..4d07dc043b81286ebbd8e8e85f79d6851b4a00e5 100644 (file)
@@ -143,6 +143,7 @@ SetBlob
         qsort( rgSetBlob, sk_OPENSSL_BLOCK_num(a), sizeof(MYBLOB), SetBlobCmp);
                if (!(pTempMem = OPENSSL_malloc(totSize)))
                        {
+                       OPENSSL_free(rgSetBlob);
                        ASN1err(ASN1_F_I2D_ASN1_SET,ERR_R_MALLOC_FAILURE);
                        return(0);
                        }