mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 08:02:13 +02:00
Fixed memory leaks when destroying a channel, when loading nonexisten scripts and in topics, patch by Toby Peterson
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3707 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
a5fdd2358f
commit
19e800cf23
3 changed files with 8 additions and 4 deletions
|
|
@ -373,11 +373,13 @@ char *perl_script_get_path(const char *name)
|
|||
/* check from SCRIPTDIR */
|
||||
g_free(path);
|
||||
path = g_strdup_printf(SCRIPTDIR"/%s", file);
|
||||
if (stat(path, &statbuf) != 0)
|
||||
path = NULL;
|
||||
if (stat(path, &statbuf) != 0) {
|
||||
g_free(path);
|
||||
path = NULL;
|
||||
}
|
||||
}
|
||||
g_free(file);
|
||||
return path;
|
||||
return path;
|
||||
}
|
||||
|
||||
/* If core should handle printing script errors */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue