This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] fix dirent resource leak in gdbserver/linux-low.c
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Vladimir Prus <vladimir at codesourcery dot com>
- Date: Sat, 26 Feb 2011 16:24:15 -0800
- Subject: [RFA] fix dirent resource leak in gdbserver/linux-low.c
Found by coverity.
2011-02-26 Michael Snyder <msnyder@vmware.com>
* linux-low.c (list_threads): Call closedir for dirent.
Index: linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.168
diff -u -p -u -p -r1.168 linux-low.c
--- linux-low.c 6 Jan 2011 00:14:09 -0000 1.168
+++ linux-low.c 27 Feb 2011 00:21:14 -0000
@@ -4549,6 +4549,7 @@ list_threads (int pid, struct buffer *bu
}
}
free (core_numbers);
+ closedir (dir);
}
static void