remove dead code
authorNils Larsch <nils@openssl.org>
Mon, 26 Feb 2007 18:21:19 +0000 (18:21 +0000)
committerNils Larsch <nils@openssl.org>
Mon, 26 Feb 2007 18:21:19 +0000 (18:21 +0000)
crypto/pkcs7/pk7_smime.c

index 5c2e3b6f92b4523efc5e5a187f8e5c8332b3ffc6..64a3cc476362356e0c10ced32a4389ae4c969c66 100644 (file)
@@ -163,7 +163,6 @@ PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert,
                                        int flags)
        {
        PKCS7_SIGNER_INFO *si = NULL;
-       int si_free = 1;
        STACK_OF(X509_ALGOR) *smcap = NULL;
        if(!X509_check_private_key(signcert, pkey))
                {
@@ -179,10 +178,6 @@ PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert,
                return NULL;
                }
 
-       /* si is now part of p7 so don't free it on error */
-
-       si_free = 0;
-
        if(!(flags & PKCS7_NOCERTS))
                {
                if (!PKCS7_add_certificate(p7, signcert))
@@ -229,8 +224,6 @@ PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert,
        err:
        if (smcap)
                sk_X509_ALGOR_pop_free(smcap, X509_ALGOR_free);
-       if (si && si_free)
-               PKCS7_SIGNER_INFO_free(si);
        return NULL;
        }