mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 23:36:22 +00:00
Free strings in autocomplete_param_no_with_func
Regards https://github.com/profanity-im/profanity/issues/1019
This commit is contained in:
@@ -366,10 +366,17 @@ autocomplete_param_no_with_func(const char *const input, char *command, int arg_
|
|||||||
result_str = g_string_new("");
|
result_str = g_string_new("");
|
||||||
g_string_append(result_str, start_str);
|
g_string_append(result_str, start_str);
|
||||||
g_string_append(result_str, found);
|
g_string_append(result_str, found);
|
||||||
|
|
||||||
|
free(start_str);
|
||||||
|
free(comp_str);
|
||||||
|
|
||||||
char *result = result_str->str;
|
char *result = result_str->str;
|
||||||
g_string_free(result_str, FALSE);
|
g_string_free(result_str, FALSE);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
free(start_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user