diff gensignkey.c @ 986:8d0c33e8ddab coverity

merge
author Matt Johnston <matt@ucc.asn.au>
date Sun, 04 Jan 2015 22:33:12 +0800
parents 2b62f26cf808
children 2bb4c662d1c2
line wrap: on
line diff
--- a/gensignkey.c	Tue Oct 21 22:34:20 2014 +0800
+++ b/gensignkey.c	Sun Jan 04 22:33:12 2015 +0800
@@ -41,6 +41,9 @@
 
 out:
 	if (fd >= 0) {
+		if (fsync(fd) != 0) {
+			dropbear_log(LOG_ERR, "fsync of %s failed: %s", filename, strerror(errno));
+		}
 		m_close(fd);
 	}
 	return ret;