diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-mime-utils.c | 6 | ||||
-rw-r--r-- | camel/camel-url.c | 26 |
3 files changed, 23 insertions, 14 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index c8c34fc609..056a488f9b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +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. + 2001-07-26 Dan Winship <danw@ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command_start): diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 13b8253926..8116829b7f 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -2844,7 +2844,7 @@ header_encode_param (const unsigned char *in, gboolean *encoded) } void -header_param_list_format_append(GString *out, struct _header_param *p) +header_param_list_format_append (GString *out, struct _header_param *p) { int used = out->len; @@ -2861,6 +2861,10 @@ header_param_list_format_append(GString *out, struct _header_param *p) } value = header_encode_param (p->value, &encoded); + if (!value) { + g_warning ("appending parameter %s=%s violates rfc2184", p->name, p->value); + value = g_strdup (p->value); + } if (!encoded) { char *ch; 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); + } } |