git.samba.org
/
jelmer
/
ctrlproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc902e6
)
Fix freeaddrinfo() on FreeBSD.
author
Jelmer Vernooij
<jelmer@samba.org>
Tue, 26 Aug 2008 14:55:51 +0000
(16:55 +0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Tue, 26 Aug 2008 14:55:51 +0000
(16:55 +0200)
NEWS
patch
|
blob
|
history
lib/connection.c
patch
|
blob
|
history
diff --git
a/NEWS
b/NEWS
index 3453a66ce25f225b8143c0079509c84ae58cc03c..c25444ed0e4d5ff6347adb1059c4f70702aa9be3 100644
(file)
--- a/
NEWS
+++ b/
NEWS
@@
-30,6
+30,9
@@
Ctrlproxy 3.0.8 UNRELEASED
* Don't crash when no argument is specified to STOPLISTENER. (#201)
+ * Fix segfault on FreeBSD because it doesn't like freeaddrinfo(NULL).
+ (#202)
+
INTERNALS
* Use generic storage for MODEs.
diff --git
a/lib/connection.c
b/lib/connection.c
index 5bcdc564997a1e58740d7c3aeeb94b9532a8240b..d0dc400ea3a0511869b7deb49c659e24b92b2494 100644
(file)
--- a/
lib/connection.c
+++ b/
lib/connection.c
@@
-470,7
+470,8
@@
static gboolean connect_current_tcp_server(struct irc_network *s)
if (error) {
network_log(LOG_ERROR, s, "Unable to lookup %s:%s %s",
cs->host, cs->port, gai_strerror(error));
- freeaddrinfo(addrinfo);
+ if (addrinfo != NULL)
+ freeaddrinfo(addrinfo);
return FALSE;
}