[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 12/15] udpkg status fix fd leak on error path



found in status_merge().

Signed-off-by: maximilian attems <max@stro.at>
---
 packages/udpkg/status.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/packages/udpkg/status.c b/packages/udpkg/status.c
index 23fc1b7..c6d6f22 100644
--- a/packages/udpkg/status.c
+++ b/packages/udpkg/status.c
@@ -287,6 +287,7 @@ int status_merge(void *status, struct package_t *pkgs)
 	if ((fout = fopen(STATUSFILE ".new", "w")) == NULL)
 	{
 		perror(STATUSFILE ".new");
+		fclose(fin);
 		return 0;
 	}
 	if (getenv(UDPKG_QUIET) == NULL)
-- 
1.7.2.3


Reply to: