Blob Blame History Raw
From b6e3deeef71a78c575d6e169d007956c02abc5da Mon Sep 17 00:00:00 2001
From: wouter <wouter@14dc9c71-5cc2-e011-b339-0019d10b89f4>
Date: Mon, 26 Aug 2013 08:41:03 +0000
Subject: [PATCH] - Fix#522: Errors found by static analysis of source from
 Tomas Hozza.

git-svn-id: http://www.nlnetlabs.nl/svn/dnssec-trigger/trunk@649 14dc9c71-5cc2-e011-b339-0019d10b89f4
---
 riggerd/riggerd.c | 1 +
 riggerd/update.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/riggerd/riggerd.c b/riggerd/riggerd.c
index dc61216..ef46691 100644
--- a/riggerd/riggerd.c
+++ b/riggerd/riggerd.c
@@ -110,6 +110,7 @@ static RETSIGTYPE record_sigh(int sig)
 #ifdef SIGHUP
 	case SIGHUP:
 		sig_reload = 1;
+		/* fall through and exit commbase with reload boolean set */
 #endif
 	case SIGTERM:
 #ifdef SIGQUIT
diff --git a/riggerd/update.c b/riggerd/update.c
index 437f981..dff5380 100644
--- a/riggerd/update.c
+++ b/riggerd/update.c
@@ -573,6 +573,7 @@ selfupdate_write_file(struct selfupdate* se, struct http_get* hg)
 		out)) {
 		log_err("cannot write to file %s: %s", se->download_file,
 			strerror(errno));
+		fclose(out);
 		goto fail;
 	}
 	fclose(out);
-- 
1.8.3.1