mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Avoid potential memory leak.
[originally from svn r2278]
This commit is contained in:
parent
06a8f88e58
commit
269557cb64
@ -106,10 +106,7 @@ void sk_cleanup(void)
|
||||
|
||||
char *error_string(int error)
|
||||
{
|
||||
char *ret = smalloc(strlen(strerror(error)) +
|
||||
strlen("Network error: "));
|
||||
sprintf(ret, "Network error: %s",strerror(error));
|
||||
return ret;
|
||||
return strerror(error);
|
||||
}
|
||||
|
||||
SockAddr sk_namelookup(char *host, char **canonicalname)
|
||||
|
Loading…
Reference in New Issue
Block a user