mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 20:36:38 +02:00
api: return allocated string in hook_info callback and function info_get
This commit is contained in:
@@ -189,8 +189,7 @@ script_completion_scripts_files_cb (const void *pointer, void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
const char *weechat_home;
|
||||
char *directory;
|
||||
char *weechat_home, *directory;
|
||||
int length, i;
|
||||
void *pointers[2];
|
||||
|
||||
@@ -228,6 +227,9 @@ script_completion_scripts_files_cb (const void *pointer, void *data,
|
||||
free (directory);
|
||||
}
|
||||
|
||||
if (weechat_home)
|
||||
free (weechat_home);
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user