mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
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
This commit is contained in:
parent
7755aae26b
commit
80c03f4572
@ -143,11 +143,15 @@ static void cmd_window_prev(void)
|
|||||||
|
|
||||||
static void cmd_window_level(const char *data)
|
static void cmd_window_level(const char *data)
|
||||||
{
|
{
|
||||||
|
char *level;
|
||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
window_set_level(active_win, combine_level(active_win->level, data));
|
window_set_level(active_win, combine_level(active_win->level, data));
|
||||||
printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Window level is now %s",
|
|
||||||
bits2level(active_win->level));
|
level = bits2level(active_win->level);
|
||||||
|
printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Window level is now %s", level);
|
||||||
|
g_free(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmd_window_server(const char *data)
|
static void cmd_window_server(const char *data)
|
||||||
|
@ -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
|
noinst_LTLIBRARIES = libirc.la
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ static void get_source_host_ip(void)
|
|||||||
source_host_ok = *settings_get_str("hostname") != '\0' &&
|
source_host_ok = *settings_get_str("hostname") != '\0' &&
|
||||||
net_gethostbyname(settings_get_str("hostname"), &ip) == 0;
|
net_gethostbyname(settings_get_str("hostname"), &ip) == 0;
|
||||||
if (source_host_ok) {
|
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));
|
memcpy(source_host_ip, &ip, sizeof(IPADDR));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user