api: fix memory leak in function string_dyn_free()
Bug was introduced by commit af138840b3
.
v2.8-utf8proc
parent
20bb762e28
commit
c652598ad7
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue