[PATCH] Do not free cert context after deletion

Wald Commits scm-commit at wald.intevation.org
Wed Oct 15 13:17:05 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1413371822 -7200
# Node ID 18211dce3106eac0f88e63fa01ea424981c06f7f
# Parent  562d66614b5c88002f9643a925187b337810ee3b
Do not free cert context after deletion

    CertDeleteCertificateFromStore already frees the context.

diff -r 562d66614b5c -r 18211dce3106 cinst/windowsstore.c
--- a/cinst/windowsstore.c	Wed Oct 15 13:06:19 2014 +0200
+++ b/cinst/windowsstore.c	Wed Oct 15 13:17:02 2014 +0200
@@ -93,13 +93,11 @@
           char *error = getLastErrorMsg();
           ERRORPRINTF ("Error deleting certificate. %s", error);
           debug_print_subject (pCert);
-          CertFreeCertificateContext (pCert);
           free (error);
           continue;
         }
       log_certificate (elevated ? "Local Machine" : "Current User",
                        to_remove[i], false);
-      CertFreeCertificateContext (pCert);
     }
   return;
 }


More information about the Trustbridge-commits mailing list