From: Ken Raeburn Date: Wed, 28 Jul 2004 23:45:27 +0000 (+0000) Subject: * tcl_kadm5.c (parse_flags, parse_keysalts, parse_key_data, parse_tl_data, X-Git-Tag: krb5-1.4-beta1~182 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=06ab0c4f80feac66aab1e10ed7a9a7042bb7a40a;p=krb5.git * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16626 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/testing/util/ChangeLog b/src/kadmin/testing/util/ChangeLog index 60540e71f..868eeb980 100644 --- a/src/kadmin/testing/util/ChangeLog +++ b/src/kadmin/testing/util/ChangeLog @@ -1,3 +1,12 @@ +2004-07-28 Ken Raeburn + + * 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 * Makefile.in (DEFINES): New variable. Define HAS_STDARG for Tcl diff --git a/src/kadmin/testing/util/tcl_kadm5.c b/src/kadmin/testing/util/tcl_kadm5.c index e1e360213..21e029bd1 100644 --- a/src/kadmin/testing/util/tcl_kadm5.c +++ b/src/kadmin/testing/util/tcl_kadm5.c @@ -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; } diff --git a/src/kadmin/testing/util/tcl_ovsec_kadm.c b/src/kadmin/testing/util/tcl_ovsec_kadm.c index e1eeceaf9..e67b84d5c 100644 --- a/src/kadmin/testing/util/tcl_ovsec_kadm.c +++ b/src/kadmin/testing/util/tcl_ovsec_kadm.c @@ -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; }