1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +02:00

core: fix memory leak when using multiple "-d" or "-r" in command line arguments

This commit is contained in:
Sébastien Helleu
2015-12-23 07:17:37 +01:00
parent cb23d0166a
commit 841444b68c
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -52,6 +52,8 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
[[1.4_bugs]]
=== Bugs fixed
* core: fix memory leak when using multiple "-d" or "-r" in command line
arguments
* core: don't complain any more about "tmux" and "tmux-256color" $TERM values
when WeeChat is running under tmux (issue #519)
* core: fix truncated messages after a word with a length of zero on screen
+8
View File
@@ -191,7 +191,11 @@ weechat_parse_args (int argc, char *argv[])
|| (strcmp (argv[i], "--dir") == 0))
{
if (i + 1 < argc)
{
if (weechat_home)
free (weechat_home);
weechat_home = strdup (argv[++i]);
}
else
{
string_iconv_fprintf (stderr,
@@ -255,7 +259,11 @@ weechat_parse_args (int argc, char *argv[])
|| (strcmp (argv[i], "--run-command") == 0))
{
if (i + 1 < argc)
{
if (weechat_startup_commands)
free (weechat_startup_commands);
weechat_startup_commands = strdup (argv[++i]);
}
else
{
string_iconv_fprintf (stderr,