Module: sip-router
Branch: 3.3
Commit: 26d2413bba1c7b9fbc5bfa84acc3499bf08c5cd6
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=26d2413…
Author: Anca Vamanu <anca.vamanu(a)1and1.ro>
Committer: Anca Vamanu <anca.vamanu(a)1and1.ro>
Date: Thu Aug 30 17:21:29 2012 +0300
modules/db_cassandra: Fixed segmentation fault in case of bad table schema
Reported by Boudewyn Ligthart.
(cherry picked from commit 0f8f21e390e8442cf1f527d3654dedc5a40bfcea)
---
modules/db_cassandra/dbcassa_base.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/db_cassandra/dbcassa_base.cpp
b/modules/db_cassandra/dbcassa_base.cpp
index 8a74a96..4cee513 100644
--- a/modules/db_cassandra/dbcassa_base.cpp
+++ b/modules/db_cassandra/dbcassa_base.cpp
@@ -645,6 +645,7 @@ int db_cassa_query(const db1_con_t* _h, const db_key_t* _k, const
db_op_t* _op,
if (! RES_NAMES(db_res)[col]) {
LM_ERR("no private memory left\n");
dbcassa_lock_release(tbc);
+ RES_COL_N(db_res) = col;
db_free_columns(db_res);
goto error;
}
@@ -656,6 +657,7 @@ int db_cassa_query(const db1_con_t* _h, const db_key_t* _k, const
db_op_t* _op,
if(!colp) {
LM_ERR("No column with name [%.*s] found\n", _c[col]->len,
_c[col]->s);
dbcassa_lock_release(tbc);
+ RES_COL_N(db_res) = col;
db_free_columns(db_res);
goto error;
}