Mercurial > dropbear
comparison dbutil.c @ 408:28b10e93685c
Fix failure-handling in dropbear_listen() when errstring is unset
(this codepath isn't used)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 03 Feb 2007 13:57:35 +0000 |
parents | 044bc108b9b3 |
children | b895f91c2ee6 |
comparison
equal
deleted
inserted
replaced
407:ea0929224294 | 408:28b10e93685c |
---|---|
284 if (errstring != NULL && *errstring == NULL) { | 284 if (errstring != NULL && *errstring == NULL) { |
285 int len; | 285 int len; |
286 len = 20 + strlen(strerror(err)); | 286 len = 20 + strlen(strerror(err)); |
287 *errstring = (char*)m_malloc(len); | 287 *errstring = (char*)m_malloc(len); |
288 snprintf(*errstring, len, "Error listening: %s", strerror(err)); | 288 snprintf(*errstring, len, "Error listening: %s", strerror(err)); |
289 TRACE(("leave dropbear_listen: failure, %s", strerror(err))) | 289 } |
290 return -1; | 290 TRACE(("leave dropbear_listen: failure, %s", strerror(err))) |
291 } | 291 return -1; |
292 } | 292 } |
293 | 293 |
294 TRACE(("leave dropbear_listen: success, %d socks bound", nsock)) | 294 TRACE(("leave dropbear_listen: success, %d socks bound", nsock)) |
295 return nsock; | 295 return nsock; |
296 } | 296 } |