tracker r1500 - branches/xesam-support/src/trackerd
- From: mottela svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1500 - branches/xesam-support/src/trackerd
- Date: Tue, 27 May 2008 11:26:34 +0000 (UTC)
Author: mottela
Date: Tue May 27 11:26:33 2008
New Revision: 1500
URL: http://svn.gnome.org/viewvc/tracker?rev=1500&view=rev
Log:
Fixed a potential double free in parsers
Modified:
branches/xesam-support/src/trackerd/tracker-rdf-query.c
branches/xesam-support/src/trackerd/tracker-xesam-query.c
Modified: branches/xesam-support/src/trackerd/tracker-rdf-query.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-rdf-query.c (original)
+++ branches/xesam-support/src/trackerd/tracker-rdf-query.c Tue May 27 11:26:33 2008
@@ -697,6 +697,8 @@
g_free (avalue);
g_free (data->current_field);
g_free (data->current_value);
+ data->current_field = NULL;
+ data->current_value = NULL;
return FALSE;
}
Modified: branches/xesam-support/src/trackerd/tracker-xesam-query.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-query.c (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-query.c Tue May 27 11:26:33 2008
@@ -827,6 +827,8 @@
g_free (avalue);
g_free (data->current_field);
g_free (data->current_value);
+ data->current_field = NULL;
+ data->current_value = NULL;
return FALSE;
}
@@ -1289,13 +1291,6 @@
g_string_free (data.sql_from, TRUE);
g_string_free (data.sql_where, TRUE);
- if (data.current_field) {
- g_free (data.current_field);
- }
-
- if (data.current_value) {
- g_free (data.current_value);
- }
}
g_slist_foreach (data.fields, (GFunc) g_object_unref, NULL);
@@ -1304,7 +1299,13 @@
g_slist_free (data.stack);
g_markup_parse_context_free (data.context);
-
+ if (data.current_field) {
+ g_free (data.current_field);
+ }
+
+ if (data.current_value) {
+ g_free (data.current_value);
+ }
g_free (data.parser);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]