summaryrefslogtreecommitdiffstats
path: root/src/kdc/main.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-03-25 19:17:34 -0400
committerGreg Hudson <ghudson@mit.edu>2013-03-26 13:01:29 -0400
commit58871c23ee9b5a9201f479127fda65e7fcf06310 (patch)
tree4f12cad0173686fd11f5edbbe849b741c739709e /src/kdc/main.c
parent47ec1ab146334f94b97e6572904a14ad67ee2524 (diff)
downloadkrb5-58871c23ee9b5a9201f479127fda65e7fcf06310.tar.gz
krb5-58871c23ee9b5a9201f479127fda65e7fcf06310.tar.xz
krb5-58871c23ee9b5a9201f479127fda65e7fcf06310.zip
Fix minor KDC memory leaksproxymech
Fix some small memory leaks which happen only in rare failure conditions. Reported by Will Fiveash <will.fiveash@oracle.com>.
Diffstat (limited to 'src/kdc/main.c')
-rw-r--r--src/kdc/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kdc/main.c b/src/kdc/main.c
index 2f08df60d..6c115a9df 100644
--- a/src/kdc/main.c
+++ b/src/kdc/main.c
@@ -507,6 +507,7 @@ create_workers(verto_ctx *ctx, int num)
for (i = 0; i < num; i++) {
pid = fork();
if (pid == 0) {
+ free(pids);
if (!verto_reinitialize(ctx)) {
krb5_klog_syslog(LOG_ERR,
_("Unable to reinitialize main loop"));
@@ -524,7 +525,6 @@ create_workers(verto_ctx *ctx, int num)
exit(0);
/* Return control to main() in the new worker process. */
- free(pids);
return 0;
}
if (pid == -1) {