[evolution-ews] Free memory in case when xmlNodeGetContent do not return NULL as expected
- From: Pavel Ocheretny <pocheretny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Free memory in case when xmlNodeGetContent do not return NULL as expected
- Date: Tue, 9 Aug 2011 07:23:41 +0000 (UTC)
commit e1fa8601a35b627fdc4fe7655b5f07855c436705
Author: Pavel Ocheretny <pocheretny src gnome org>
Date: Tue Aug 9 10:25:21 2011 +0300
Free memory in case when xmlNodeGetContent do not return NULL as expected
src/server/e-ews-item.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/server/e-ews-item.c b/src/server/e-ews-item.c
index 6c2db5d..c6ebff0 100644
--- a/src/server/e-ews-item.c
+++ b/src/server/e-ews-item.c
@@ -845,10 +845,11 @@ parse_task_field (EEwsItem *item, const gchar *name, ESoapParameter *subparam)
} else if (!g_ascii_strcasecmp (name, "Owner")) {
priv->task_fields->owner = e_soap_parameter_get_string_value (subparam);
} else if (!g_ascii_strcasecmp (name, "Delegator")) {
- priv->task_fields->delegator = NULL;
priv->task_fields->delegator = e_soap_parameter_get_string_value (subparam);
- if (!g_ascii_strcasecmp (priv->task_fields->delegator,""))
+ if (!g_ascii_strcasecmp (priv->task_fields->delegator, "")) {
+ g_free (priv->task_fields->delegator);
priv->task_fields->delegator = NULL;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]