aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-url.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-27 05:56:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-27 05:56:12 +0800
commitd5f77c20a8fac411744b8f444693010f28c9aeb4 (patch)
treebc5392cc0a0525529ce9cbad8cb0ff684c7aae7e /camel/camel-url.c
parent85c38af8b431e9bc0a6fe8f3c96f21cedb6f935d (diff)
downloadgsoc2013-evolution-d5f77c20a8fac411744b8f444693010f28c9aeb4.tar.gz
gsoc2013-evolution-d5f77c20a8fac411744b8f444693010f28c9aeb4.tar.zst
gsoc2013-evolution-d5f77c20a8fac411744b8f444693010f28c9aeb4.zip
Allow the url to be NULL just like the libc free convention.
2001-07-26 Jeffrey Stedfast <fejj@ximian.com> * camel-url.c (camel_url_free): Allow the url to be NULL just like the libc free convention. svn path=/trunk/; revision=11437
Diffstat (limited to 'camel/camel-url.c')
-rw-r--r--camel/camel-url.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/camel/camel-url.c b/camel/camel-url.c
index 9913eb3269..4290b4c813 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -390,19 +390,19 @@ output_param (GQuark key_id, gpointer data, gpointer user_data)
void
camel_url_free (CamelURL *url)
{
- g_return_if_fail (url);
-
- g_free (url->protocol);
- g_free (url->user);
- g_free (url->authmech);
- g_free (url->passwd);
- g_free (url->host);
- g_free (url->path);
- g_datalist_clear (&url->params);
- g_free (url->query);
- g_free (url->fragment);
-
- g_free (url);
+ if (url) {
+ g_free (url->protocol);
+ g_free (url->user);
+ g_free (url->authmech);
+ g_free (url->passwd);
+ g_free (url->host);
+ g_free (url->path);
+ g_datalist_clear (&url->params);
+ g_free (url->query);
+ g_free (url->fragment);
+
+ g_free (url);
+ }
}