1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

logger: fix memory leaks in backlog

This commit is contained in:
Sébastien Helleu
2014-08-10 13:25:35 +02:00
parent 53a9a161f4
commit fc1571645d
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -324,6 +324,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* irc: add option irc.look.notice_welcome_tags
* irc: add server option "default_msg_kick" to customize default kick/kickban
message (task #12777)
* logger: fix memory leaks in backlog
* logger: replace backslashs in name by logger replacement char under Cygwin
(bug #41207)
* lua: fix detection of Lua 5.2 in autotools (patch #8270)
+3
View File
@@ -101,6 +101,8 @@ logger_tail_file (const char *filename, int n_lines)
bytes_read = read (fd, buf, to_read);
if (bytes_read <= 0)
{
if (part_of_line)
free (part_of_line);
logger_tail_free (ptr_line);
close (fd);
return NULL;
@@ -140,6 +142,7 @@ logger_tail_file (const char *filename, int n_lines)
if (!new_line->data)
{
free (part_of_line);
free (new_line);
logger_tail_free (ptr_line);
close (fd);
return NULL;