a04c58ae99
- squash leaky file descriptors in kdeinit (kde#180785,rhbz#484370)
17 lines
394 B
Diff
17 lines
394 B
Diff
--- branches/KDE/4.2/kdelibs/kinit/kinit.cpp 2009/03/25 12:32:32 944314
|
|
+++ branches/KDE/4.2/kdelibs/kinit/kinit.cpp 2009/04/18 19:34:41 955904
|
|
@@ -184,6 +184,12 @@
|
|
*/
|
|
static void close_fds()
|
|
{
|
|
+ while (struct child *child = children) {
|
|
+ close(child->sock);
|
|
+ children = child->next;
|
|
+ free(child);
|
|
+ }
|
|
+
|
|
if (d.deadpipe[0] != -1)
|
|
{
|
|
close(d.deadpipe[0]);
|
|
|