diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-04 20:54:33 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-04 20:54:33 +0000 |
commit | 80c03f457223d7403b1a59daac265e3dab80535c (patch) | |
tree | 7b10095d84a39ca151baf42b616a72e2a8bae9fc /src/irc | |
parent | 7755aae26b200859f42477c386462dfe06c10604 (diff) | |
download | irssi-80c03f457223d7403b1a59daac265e3dab80535c.zip |
fixed two minor memleaks. irc/bot directory isn't now build if you specify
--without-bot parameter to configure
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@294 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/Makefile.am | 6 | ||||
-rw-r--r-- | src/irc/core/server-setup.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/irc/Makefile.am b/src/irc/Makefile.am index dbfe6997..e308a7dc 100644 --- a/src/irc/Makefile.am +++ b/src/irc/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = core bot dcc flood notifylist +if BUILD_IRSSIBOT +BOT=bot +endif + +SUBDIRS = core $(BOT) dcc flood notifylist noinst_LTLIBRARIES = libirc.la diff --git a/src/irc/core/server-setup.c b/src/irc/core/server-setup.c index 66c0a932..296a52b2 100644 --- a/src/irc/core/server-setup.c +++ b/src/irc/core/server-setup.c @@ -43,7 +43,8 @@ static void get_source_host_ip(void) source_host_ok = *settings_get_str("hostname") != '\0' && net_gethostbyname(settings_get_str("hostname"), &ip) == 0; if (source_host_ok) { - source_host_ip = g_new(IPADDR, 1); + if (source_host_ip == NULL) + source_host_ip = g_new(IPADDR, 1); memcpy(source_host_ip, &ip, sizeof(IPADDR)); } } |