[netfilter-cvslog] r4329 - trunk/nfsim/tools

rusty at netfilter.org rusty at netfilter.org
Sat Oct 8 17:38:33 CEST 2005


Author: rusty at netfilter.org
Date: 2005-10-08 17:38:31 +0200 (Sat, 08 Oct 2005)
New Revision: 4329

Modified:
   trunk/nfsim/tools/module.c
Log:
Don't leak file descriptors when loading modules (from Max Kellerman)


Modified: trunk/nfsim/tools/module.c
===================================================================
--- trunk/nfsim/tools/module.c	2005-10-08 15:31:43 UTC (rev 4328)
+++ trunk/nfsim/tools/module.c	2005-10-08 15:38:31 UTC (rev 4329)
@@ -242,6 +242,7 @@
 		       ret = mod->init();
 		       if (ret != 0) {
 			       talloc_free(mod);
+			       closedir(dir);
 			       nfsim_log(LOG_UI, "Module %s init failed: %i",
 					 name, ret);
 			       return false;
@@ -251,6 +252,7 @@
 	       rewinddir(dir);
        } while (num_succeeded != 0);
 
+       closedir(dir);
        return (num_tried == 0);
 }
 




More information about the netfilter-cvslog mailing list