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

Function db_sqlite_free_result_rows

modules/db_sqlite/dbase.c:806–825  ·  view source on GitHub ↗

* Release a result set from memory. * \param _r result set whose rows and values should be freed * \return void */

Source from the content-addressed store, hash-verified

804 * \return void
805 */
806static void db_sqlite_free_result_rows(db_res_t* _r)
807{
808 db_val_t* values;
809
810 if (!_r) {
811 LM_DBG("nothing to free!\n");
812 return;
813 }
814
815 if(RES_ROWS(_r)!=0)
816 {
817 values = _r->rows[0].values;
818 /* db_sqlite_allocate_rows allocates memory for rows and values separately.
819 * Hence freeing rows using generic function and then values separately*/
820 db_free_rows(_r);
821 pkg_free(values);
822 }
823 RES_ROWS(_r) = 0;
824 RES_ROW_N(_r) = 0;
825}
826
827/**
828 * Retrieve a result set

Callers 1

db_sqlite_fetch_resultFunction · 0.85

Calls 1

db_free_rowsFunction · 0.85

Tested by

no test coverage detected