diff options
author | Greg Hudson <ghudson@mit.edu> | 2018-08-05 19:00:33 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2018-08-09 12:15:53 -0400 |
commit | 91cd841086cdfbb7f171126ca132301123daf15e (patch) | |
tree | 930f93762de939cba49097b3e85686c247edf979 /src/util | |
parent | e3d3c951b243a230c535233ebf9c8950d255b70b (diff) | |
download | krb5-91cd841086cdfbb7f171126ca132301123daf15e.zip krb5-91cd841086cdfbb7f171126ca132301123daf15e.tar.gz krb5-91cd841086cdfbb7f171126ca132301123daf15e.tar.bz2 |
Fix memory leaks in test programs
Fix additional memory leaks detected by a newer asan (clang version
6.0.0) in test programs.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/profile/prof_test1 | 1 | ||||
-rw-r--r-- | src/util/profile/profile_tcl.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/util/profile/prof_test1 b/src/util/profile/prof_test1 index 7d13c93..fc67571 100644 --- a/src/util/profile/prof_test1 +++ b/src/util/profile/prof_test1 @@ -360,6 +360,7 @@ proc test10 {} { puts stderr "Error: test10: Did not find expected chores." exit 1 } + profile_release $p } test1 diff --git a/src/util/profile/profile_tcl.c b/src/util/profile/profile_tcl.c index eb9950a..de61bae 100644 --- a/src/util/profile/profile_tcl.c +++ b/src/util/profile/profile_tcl.c @@ -2234,6 +2234,7 @@ _wrap_profile_get_string(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, i char *s = (arg6 && *arg6) ? *arg6 : ""; Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), Tcl_NewStringObj(s, strlen(s))); + profile_release_string(s); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); |