MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / db_free_rows

Function db_free_rows

db/db_res.c:41–63  ·  view source on GitHub ↗

* Release memory used by rows */

Source from the content-addressed store, hash-verified

39 * Release memory used by rows
40 */
41int db_free_rows(db_res_t* _r)
42{
43 int i;
44
45 if (!_r) {
46 LM_ERR("invalid parameter value\n");
47 return -1;
48 }
49 LM_DBG("freeing %d rows\n", RES_ROW_N(_r));
50
51 if (RES_ROWS(_r)) {
52 for(i = 0; i < RES_ROW_N(_r); i++)
53 db_free_row(&(RES_ROWS(_r)[i]));
54
55 LM_DBG("freeing rows at %p\n", RES_ROWS(_r));
56 pkg_free(RES_ROWS(_r));
57 RES_ROWS(_r) = NULL;
58 }
59
60 RES_ROW_N(_r) = 0;
61
62 return 0;
63}
64
65
66/*

Callers 11

db_mysql_convert_rowsFunction · 0.85
db_mysql_fetch_resultFunction · 0.85
get_rowsFunction · 0.85
db_unixodbc_convert_rowsFunction · 0.85
db_sqlite_convert_rowsFunction · 0.85
dbt_convert_rowsFunction · 0.85
db_http_free_resultFunction · 0.85
_bdb_delete_cursorFunction · 0.85
db_postgres_fetch_resultFunction · 0.85
db_free_resultFunction · 0.85

Calls 1

db_free_rowFunction · 0.85

Tested by

no test coverage detected