[libgda] Partial correction for bug #680639



commit 60cf1b17993a1742b64d7ce82b0cf0f02fef6d9e
Author: Vivien Malerba <malerba gnome-db org>
Date:   Tue Jul 31 18:43:41 2012 +0200

    Partial correction for bug #680639

 libgda/sql-parser/gda-statement-struct-compound.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libgda/sql-parser/gda-statement-struct-compound.c b/libgda/sql-parser/gda-statement-struct-compound.c
index dd63fd5..f09a764 100644
--- a/libgda/sql-parser/gda-statement-struct-compound.c
+++ b/libgda/sql-parser/gda-statement-struct-compound.c
@@ -193,7 +193,13 @@ _gda_sql_statement_compound_reduce (GdaSqlAnyPart *compound_or_select)
 		GdaSqlStatementCompound *compound = (GdaSqlStatementCompound*) part;
 		if (compound->stmt_list && !compound->stmt_list->next) {
 			GdaSqlAnyPart *rpart;
-			rpart = GDA_SQL_ANY_PART (((GdaSqlStatement *) compound->stmt_list->data)->contents);
+			GdaSqlStatement *substmt;
+			substmt = (GdaSqlStatement *) compound->stmt_list->data;
+
+			rpart = GDA_SQL_ANY_PART (substmt->contents);
+			substmt->contents = NULL;
+			gda_sql_statement_free (substmt);
+
 			g_slist_free (compound->stmt_list);
 			compound->stmt_list = NULL;
 			_gda_sql_statement_compound_free (compound);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]