* tcl_kadm5.c (parse_flags, parse_keysalts, parse_key_data, parse_tl_data,
authorKen Raeburn <raeburn@mit.edu>
Wed, 28 Jul 2004 23:45:27 +0000 (23:45 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 28 Jul 2004 23:45:27 +0000 (23:45 +0000)
parse_principal_ent, parse_policy_ent): Use Tcl_Free, not free, to release
storage allocated by Tcl_SplitList.
* tcl_ovsec_kadm.c (parse_flags, parse_principal_ent, parse_policy_ent):
Likewise.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16626 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/testing/util/ChangeLog
src/kadmin/testing/util/tcl_kadm5.c
src/kadmin/testing/util/tcl_ovsec_kadm.c

index 60540e71f359700d37a36f16ed0fb3649f3fc967..868eeb98014ca9711c603b8dfedb67f0c83242fd 100644 (file)
@@ -1,3 +1,12 @@
+2004-07-28  Ken Raeburn  <raeburn@mit.edu>
+
+       * tcl_kadm5.c (parse_flags, parse_keysalts, parse_key_data,
+       parse_tl_data, parse_principal_ent, parse_policy_ent): Use
+       Tcl_Free, not free, to release storage allocated by
+       Tcl_SplitList.
+       * tcl_ovsec_kadm.c (parse_flags, parse_principal_ent,
+       parse_policy_ent): Likewise.
+
 2003-01-08  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (DEFINES): New variable.  Define HAS_STDARG for Tcl
index e1e36021390524200b86b6601a6ab2c50700b500..21e029bd1ed2421d967a7987e82033c26cfccd52 100644 (file)
@@ -570,7 +570,7 @@ static int parse_flags(Tcl_Interp *interp, Tcl_HashTable *table,
          *flags |= *(krb5_flags *) Tcl_GetHashValue(entry);
      }
   
-     free(argv);
+     Tcl_Free(argv);
      return(retcode);
 }
 
@@ -832,14 +832,15 @@ static int parse_keysalts(Tcl_Interp *interp, char *list,
          }
          (*keysalts)[i].ks_salttype = tmp;
 
-         free(argv1);
+         Tcl_Free(argv1);
          argv1 = NULL;
      }
 
 finished:
-     if (argv1)
-         free(argv1);
-     free(argv);
+     if (argv1) {
+         Tcl_Free(argv1);
+     }
+     Tcl_Free(argv);
      return retcode;
 }
 
@@ -878,7 +879,7 @@ static int parse_key_data(Tcl_Interp *interp, char *list,
      }
 
 finished:
-     free(argv);
+     Tcl_Free(argv);
      return retcode;
 }
 
@@ -955,7 +956,7 @@ static int parse_tl_data(Tcl_Interp *interp, char *list,
          tl->tl_data_contents = (krb5_octet *) malloc(tmp+1);
          strcpy((char *) tl->tl_data_contents, argv1[2]);
 
-         free(argv1);
+         Tcl_Free(argv1);
          argv1 = NULL;
          tl = tl->tl_data_next;
      }
@@ -967,9 +968,10 @@ static int parse_tl_data(Tcl_Interp *interp, char *list,
      *tlp = tl2;
 
 finished:
-     if (argv1)
-         free(argv1);
-     free(argv);
+     if (argv1) {
+         Tcl_Free(argv1);
+     }
+     Tcl_Free(argv);
      return retcode;
 }
 
@@ -1326,7 +1328,7 @@ static int parse_principal_ent(Tcl_Interp *interp, char *list,
      }
 
 finished:
-     free(argv);
+     Tcl_Free(argv);
      *out_princ = princ;
      return retcode;
 }
@@ -1475,7 +1477,7 @@ static int parse_policy_ent(Tcl_Interp *interp, char *list,
      policy->policy_refcnt = tmp;
 
 finished:
-     free(argv);
+     Tcl_Free(argv);
      *out_policy = policy;
      return retcode;
 }
index e1eeceaf934f7b095f16653453a4b4aae6030176..e67b84d5c3a806b31afe5a825d71c60f1ceb974c 100644 (file)
@@ -470,7 +470,7 @@ static int parse_flags(Tcl_Interp *interp, Tcl_HashTable *table,
          *flags |= *(krb5_flags *) Tcl_GetHashValue(entry);
      }
   
-     free(argv);
+     Tcl_Free(argv);
      return(retcode);
 }
 
@@ -781,7 +781,7 @@ static int parse_principal_ent(Tcl_Interp *interp, char *list,
      }
 
 finished:
-     free(argv);
+     Tcl_Free(argv);
      *out_princ = princ;
      return retcode;
 }
@@ -930,7 +930,7 @@ static int parse_policy_ent(Tcl_Interp *interp, char *list,
      policy->policy_refcnt = tmp;
 
 finished:
-     free(argv);
+     Tcl_Free(argv);
      *out_policy = policy;
      return retcode;
 }