mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 05:16:38 +02:00
api: fix memory leak in function string_dyn_free()
Bug was introduced by commit af138840b3.
This commit is contained in:
@@ -3453,10 +3453,12 @@ string_dyn_free (char **string, int free_string)
|
||||
if (free_string)
|
||||
{
|
||||
free (ptr_string_dyn->string);
|
||||
return NULL;
|
||||
ptr_string = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_string = ptr_string_dyn->string;
|
||||
}
|
||||
|
||||
ptr_string = ptr_string_dyn->string;
|
||||
|
||||
free (ptr_string_dyn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user