changeset 1066:cce03ea8e6eb

strdup strerror
author Matt Johnston <matt@ucc.asn.au>
date Wed, 11 Mar 2015 23:10:27 +0800
parents 23103e1e9548
children ce21d0bfaf98 2dee3eef5344
files netio.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/netio.c	Tue Mar 03 20:53:00 2015 +0800
+++ b/netio.c	Wed Mar 11 23:10:27 2015 +0800
@@ -241,7 +241,7 @@
 			c->sock = -1;
 
 			m_free(c->errstring);
-			c->errstring = strerror(val);
+			c->errstring = m_strdup(strerror(val));
 		} else {
 			/* New connection has been established */
 			c->cb(DROPBEAR_SUCCESS, c->sock, c->cb_data, NULL);