diff loginrec.c @ 1523:1d163552145f coverity

merge coverity
author Matt Johnston <matt@ucc.asn.au>
date Mon, 19 Feb 2018 23:14:49 +0800
parents c7675aa88880
children
line wrap: on
line diff
--- a/loginrec.c	Sat Feb 17 11:29:17 2018 +0800
+++ b/loginrec.c	Mon Feb 19 23:14:49 2018 +0800
@@ -1330,7 +1330,8 @@
 
 		if ( lseek(*fd, offset, SEEK_SET) != offset ) {
 			dropbear_log(LOG_WARNING, "lastlog_openseek: %s->lseek(): %s",
-			 lastlog_file, strerror(errno));
+				lastlog_file, strerror(errno));
+			m_close(*fd);
 			return 0;
 		}
 	}