[Skiboot] [PATCH] libstb/create-container: Fix coverity warnings

hellerda at linux.vnet.ibm.com hellerda at linux.vnet.ibm.com
Thu May 4 06:47:56 AEST 2017


From: Dave Heller <hellerda at linux.vnet.ibm.com>

Signed-off-by: Dave Heller <hellerda at linux.vnet.ibm.com>
---
 libstb/create-container.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libstb/create-container.c b/libstb/create-container.c
index 85e0e08..437a425 100644
--- a/libstb/create-container.c
+++ b/libstb/create-container.c
@@ -115,6 +115,7 @@ void getSigRaw(ecc_signature_t *sigraw, char *inFile)
 	memcpy(*sigraw, outbuf, 2*EC_COORDBYTES);
 
 	ECDSA_SIG_free(signature);
+	close(fdin);
 
 	return;
 }
@@ -122,7 +123,7 @@ void getSigRaw(ecc_signature_t *sigraw, char *inFile)
 void writeHdr(void *hdr, const char *outFile, int hdr_type)
 {
 	int fdout;
-	int r, hdr_sz;
+	int r, hdr_sz=0;
 	const char *lead;
 	unsigned char md[SHA512_DIGEST_LENGTH];
 
-- 
2.9.3



More information about the Skiboot mailing list