mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-07 14:26:00 +01:00
remove a memory leak
This commit is contained in:
parent
765bd612b0
commit
e98ec46bd1
1 changed files with 3 additions and 5 deletions
|
@ -4015,10 +4015,8 @@ scmd_search(gchar* input, Argument* argument)
|
||||||
if(!input || !strlen(input))
|
if(!input || !strlen(input))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
Argument* newarg = g_malloc0(sizeof(argument));
|
argument->data = input;
|
||||||
newarg->n = argument->n;
|
sc_search(argument);
|
||||||
newarg->data = g_strdup(input);
|
|
||||||
sc_search(newarg);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4166,7 +4164,7 @@ cb_inputbar_kb_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||||
|
|
||||||
if(new_utf_char != 0)
|
if(new_utf_char != 0)
|
||||||
{
|
{
|
||||||
gchar* newchar = malloc(6 * sizeof(gchar));
|
gchar* newchar = g_malloc0(6 * sizeof(gchar));
|
||||||
if(newchar == NULL)
|
if(newchar == NULL)
|
||||||
{
|
{
|
||||||
g_free(input);
|
g_free(input);
|
||||||
|
|
Loading…
Reference in a new issue