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:
Georges Basile Stavracas Neto
2015-05-25 12:35:58 -04:00
committed by Erick Pérez Castellanos
parent f9b3f2f6c7
commit 6213f5cc78
-8
View File
@@ -399,9 +399,7 @@ 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);
if (parent_name2 != NULL)
g_free (parent_name2); g_free (parent_name2);
} }
else else
@@ -1370,9 +1368,7 @@ validate_url_cb (GcalSourceDialog *dialog)
dialog); dialog);
} }
if (user)
g_free (user); g_free (user);
if (password)
g_free (password); g_free (password);
} }
@@ -1380,10 +1376,7 @@ validate_url_cb (GcalSourceDialog *dialog)
} }
out: out:
if (host)
g_free (host); g_free (host);
if (path)
g_free (path); g_free (path);
return FALSE; return FALSE;
@@ -1624,7 +1617,6 @@ 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);
} }