components/net-snmp/patches/002.pkcs.patch
author Petr Nyc <Petr.Nyc@Oracle.COM>
Thu, 10 Sep 2015 04:17:54 -0700
branchs11u2-sru14-backport
changeset 4851 ad10af563202
parent 252 ee0fb1eabcbf
child 1278 5a3949922d70
permissions -rw-r--r--
Closing backport branch for S11.2SRU14.5

--- net-snmp-5.4.1/snmplib/pkcs.c	Tue Nov  6 02:00:04 2007
+++ net-snmp-5.4.1/snmplib/pkcs.mod.c	Tue Nov  6 01:58:30 2007
@@ -1,5 +1,5 @@
 /*
- * Copyright Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  * Use is subject to license terms specified in the COPYING file
  * distributed with the Net-SNMP package.
  */
@@ -107,10 +107,12 @@
 {
     int            slotcount, i;
 
+    (void) C_Finalize(NULL);
+
     if (pSlot != NULL) {
         slotcount = pSlot->count;
         for (i = 0; i < slotcount; i++) {
-            if (pSlot->pSession->hdl != NULL) {
+            if (pSlot->pSession != NULL) {
                 free(pSlot->pSession->hdl);
             }
         }
@@ -117,7 +119,6 @@
         free(pSlot);
     }
 
-    (void) C_Finalize(NULL);
     return 0;
 }