Module: sip-router Branch: janakj/postgres Commit: 70764fb02a5be0f7ccca4f6e66adbdf083fdaea8 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=70764fb0...
Author: Henning Westerholt henning.westerholt@1und1.de Committer: Henning Westerholt henning.westerholt@1und1.de Date: Fri Jan 9 13:23:11 2009 +0000
- another error condition fix for a problem that gets introduced by a recent change: don't try to free memory in the row_buf that don't belong to us anymore - reported by Bayan Towfiq, bayan at flowroute dot com - remove row_buf[col] NULL assignment that was not executed anyway
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5438 689a6050-402a-0410-94f2-e92a70836424
---
modules/db_postgres/km_res.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/modules/db_postgres/km_res.c b/modules/db_postgres/km_res.c index 548e535..0cd80c5 100644 --- a/modules/db_postgres/km_res.c +++ b/modules/db_postgres/km_res.c @@ -256,19 +256,10 @@ int db_postgres_convert_rows(const db_con_t* _h, db_res_t* _r) if(db_postgres_convert_row(_h, _r, &(RES_ROWS(_r)[row - RES_LAST_ROW(_r)]), row_buf)<0){ LM_ERR("failed to convert row #%d\n", row); RES_ROW_N(_r) = row - RES_LAST_ROW(_r); - for (col = 0; col < RES_COL_N(_r); col++) { - LM_DBG("freeing row_buf[%d] at %p\n", col, row_buf[col]); - pkg_free(row_buf[col]); - } LM_DBG("freeing row buffer at %p\n", row_buf); pkg_free(row_buf); db_free_rows(_r); return -4; - /* - * The following housekeeping may not be technically required, but it - * is a good practice to NULL pointer fields that are no longer valid. - */ - row_buf[col] = (char *)NULL; } }