Skip to content

Commit

Permalink
Fix memory leaks in test programs
Browse files Browse the repository at this point in the history
Fix additional memory leaks detected by a newer asan (clang version
6.0.0) in test programs.
  • Loading branch information
greghudson committed Aug 9, 2018
1 parent e3d3c95 commit 91cd841
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/krb5/krb/t_valid_times.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,7 @@ main()
ret = krb5int_validate_times(context, &times);
assert(ret == KRB5KRB_AP_ERR_TKT_EXPIRED);

krb5_free_context(context);

return 0;
}
1 change: 1 addition & 0 deletions src/util/profile/prof_test1
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ proc test10 {} {
puts stderr "Error: test10: Did not find expected chores."
exit 1
}
profile_release $p
}

test1
Expand Down
1 change: 1 addition & 0 deletions src/util/profile/profile_tcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 91cd841

Please sign in to comment.