Commit e98ec46b authored by Sebastian Ramacher's avatar Sebastian Ramacher

remove a memory leak

parent 765bd612
......@@ -4015,10 +4015,8 @@ scmd_search(gchar* input, Argument* argument)
if(!input || !strlen(input))
return TRUE;
Argument* newarg = g_malloc0(sizeof(argument));
newarg->n = argument->n;
newarg->data = g_strdup(input);
sc_search(newarg);
argument->data = input;
sc_search(argument);
return TRUE;
}
......@@ -4166,7 +4164,7 @@ cb_inputbar_kb_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
if(new_utf_char != 0)
{
gchar* newchar = malloc(6 * sizeof(gchar));
gchar* newchar = g_malloc0(6 * sizeof(gchar));
if(newchar == NULL)
{
g_free(input);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment