libgda r3187 - in branches/libgda-3-2: . libgda
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: libgda r3187 - in branches/libgda-3-2: . libgda
- Date: Mon, 4 Aug 2008 11:47:31 +0000 (UTC)
Author: arminb
Date: Mon Aug 4 11:47:31 2008
New Revision: 3187
URL: http://svn.gnome.org/viewvc/libgda?rev=3187&view=rev
Log:
2008-08-04 Armin Burgmeier <armin openismus com>
* libgda/gda-server-operation.c (load_xml_spec): Fix a crash on
Windows, don't leak this_lang (backported from trunk).
Modified:
branches/libgda-3-2/ChangeLog
branches/libgda-3-2/libgda/gda-server-operation.c
Modified: branches/libgda-3-2/libgda/gda-server-operation.c
==============================================================================
--- branches/libgda-3-2/libgda/gda-server-operation.c (original)
+++ branches/libgda-3-2/libgda/gda-server-operation.c Mon Aug 4 11:47:31 2008
@@ -750,17 +750,25 @@
/* don't care about entries for the wrong locale */
this_lang = xmlGetProp(node, (xmlChar*)"lang");
- if (this_lang && strncmp ((gchar*)this_lang, lang, strlen ((gchar*)this_lang))) {
- g_free (this_lang);
+ if (this_lang) {
+ if (strncmp ((gchar*)this_lang, lang, strlen ((gchar*)this_lang))) {
+ xmlFree (this_lang);
+ node = node->next;
+ continue;
+ }
+
+ xmlFree(this_lang);
+ }
+
+ id = xmlGetProp (node, BAD_CAST "id");
+ if (!id) {
node = node->next;
continue;
}
- id = xmlGetProp (node, BAD_CAST "id");
complete_path = g_strdup_printf ("%s/%s", root ? root : "", id);
path_name = g_strdup ((gchar*)id);
- if (id)
- xmlFree (id);
+ xmlFree (id);
old_opnode = node_find (op, complete_path);
if (old_opnode) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]