Blob Blame Raw
From 232711c5bda3fe5b2680bbbaf6eb9a4b59e7b51b Mon Sep 17 00:00:00 2001
From: vladut-paiu <vladut-paiu@689a6050-402a-0410-94f2-e92a70836424>
Date: Tue, 3 Jul 2012 09:34:52 +0000
Subject: [PATCH 3/8] Reset column types to NULL upon freeing resultset columns
 Credit to Peter Lemenkov

---
 db/db_res.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/db/db_res.c b/db/db_res.c
index 78868ec..cbba30f 100644
--- a/db/db_res.c
+++ b/db/db_res.c
@@ -77,6 +77,7 @@ int db_free_columns(db_res_t* _r)
 	/* free names and types */
 	if (RES_NAMES(_r)) {
 		LM_DBG("freeing result columns at %p\n", RES_NAMES(_r));
+		RES_TYPES(_r) = NULL;
 		pkg_free(RES_NAMES(_r));
 		RES_NAMES(_r) = NULL;
 	}
-- 
1.8.1