[EDT][Busybox][PATCH] Fixes resource leak: missing fclose after fopen

Maninder Singh maninder1.s at samsung.com
Fri May 8 03:49:32 UTC 2015


EP-E9D7571734A347E2ADA07C4134AB97EA

Hi,

Package: busybox
Version: v1.24.0.git
Severity: wishlist

This patch fixes a samll resource leak- Missing fclose after fopen. 

Signed-off-by: Akhilesh Kumar <akhilesh.k at samsung.com>
Signed-off-by: Maninder Singh <maninder1.s at samsung.com>
---
 applets/applet_tables.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/applets/applet_tables.c b/applets/applet_tables.c
index 92bf1e4..b2f9023 100644
--- a/applets/applet_tables.c
+++ b/applets/applet_tables.c
@@ -167,6 +167,7 @@ int main(int argc, char **argv)
 			if (!fp)
 				return 1;
 			fputs(line_new, fp);
+			fclose(fp);
 		}
 	}
 
-- 
1.7.1


Thanks
Maninder Singh


More information about the busybox mailing list