source-dialog: remove useless checks before freeing memory
g_free is NULL-proof, no need to check if it's NULL before using it.
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
f9b3f2f6c7
commit
6213f5cc78
@@ -399,10 +399,8 @@ calendar_listbox_sort_func (GtkListBoxRow *row1,
|
|||||||
if (retval == 0)
|
if (retval == 0)
|
||||||
retval = g_strcmp0 (e_source_get_display_name (source1), e_source_get_display_name (source2));
|
retval = g_strcmp0 (e_source_get_display_name (source1), e_source_get_display_name (source2));
|
||||||
|
|
||||||
if (parent_name1 != NULL)
|
g_free (parent_name1);
|
||||||
g_free (parent_name1);
|
g_free (parent_name2);
|
||||||
if (parent_name2 != NULL)
|
|
||||||
g_free (parent_name2);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1370,21 +1368,16 @@ validate_url_cb (GcalSourceDialog *dialog)
|
|||||||
dialog);
|
dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user)
|
g_free (user);
|
||||||
g_free (user);
|
g_free (password);
|
||||||
if (password)
|
|
||||||
g_free (password);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
e_named_parameters_free (credentials);
|
e_named_parameters_free (credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (host)
|
g_free (host);
|
||||||
g_free (host);
|
g_free (path);
|
||||||
|
|
||||||
if (path)
|
|
||||||
g_free (path);
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1624,8 +1617,7 @@ discover_sources_cb (GObject *source,
|
|||||||
gtk_widget_show_all (row);
|
gtk_widget_show_all (row);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resource_path)
|
g_free (resource_path);
|
||||||
g_free (resource_path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Free things up
|
// Free things up
|
||||||
|
|||||||
Reference in New Issue
Block a user