From 6726c9f5eca0e49cabfdf878c02e5966bdcccd93 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sun, 13 Feb 2011 19:12:36 +0000 Subject: [PATCH] Trace logging file descriptor leak File descriptors created for trace logging were never being closed. With short-lived contexts this leak would eventually overflow the process's file table. Correct this oversight by closing the file descriptor in file_trace_cb before freeing its container. ticket: 6867 target_version: 1.9.1 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24634 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/krb5/os/trace.c b/src/lib/krb5/os/trace.c index 30942cd97..3138aaf0f 100644 --- a/src/lib/krb5/os/trace.c +++ b/src/lib/krb5/os/trace.c @@ -321,6 +321,7 @@ file_trace_cb(krb5_context context, const struct krb5_trace_info *info, void *da if (info == NULL) { /* Null info means destroy the callback data. */ + close(*fd); free(fd); return; } -- 2.26.2