projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b98850
)
Move freeaddrinfo() to inside of our loop; this prevents a memory leak
author
Ken Hornstein
<kenh@pobox.com>
Fri, 16 Jan 2009 15:48:09 +0000
(15:48 +0000)
committer
Ken Hornstein
<kenh@pobox.com>
Fri, 16 Jan 2009 15:48:09 +0000
(15:48 +0000)
and also prevents it from being called with a NULL pointer.
sbr/client.c
patch
|
blob
|
history
diff --git
a/sbr/client.c
b/sbr/client.c
index
ae6968f
..
732fb47
100644
(file)
--- a/
sbr/client.c
+++ b/
sbr/client.c
@@
-111,9
+111,10
@@
client (char *args, char *service, char *response, int len_response, int debug)
close(sd);
}
+
+ freeaddrinfo(res);
}
- freeaddrinfo(res);
client_freelist(ap);
strncpy (response, "no servers available", len_response);
return NOTOK;