Fix multiple leaks in ktutil addent In ktutil_add(), free allocations on success as well as failure. Change all early returns to jumps to the cleanup label. Free the password buffer and unparsed principal name. Do list manipulation as the final step to simplify cleanup. Reported by Bean Zhang. https://github.com/krb5/krb5/commit/76053d61fecfec8c5ea31c74bec73d2846b5effe Author: Greg Hudson Commit: 76053d61fecfec8c5ea31c74bec73d2846b5effe Branch: master src/kadmin/ktutil/ktutil_funcs.c | 96 +++++++++++++++---------------------- 1 files changed, 39 insertions(+), 57 deletions(-)