diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-14 07:32:19 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-14 07:32:19 +0000 |
| commit | f4d4f0fdd23a18fcf34b441c915eade21b63e061 (patch) | |
| tree | 1154175d25b185e20a90a5d32ad5122e7dbdf0ac /src/libs/zbxdb/db.c | |
| parent | cad4fa80e208f2c041981624dbbe6094cc7a5be9 (diff) | |
| download | zabbix-f4d4f0fdd23a18fcf34b441c915eade21b63e061.tar.gz zabbix-f4d4f0fdd23a18fcf34b441c915eade21b63e061.tar.xz zabbix-f4d4f0fdd23a18fcf34b441c915eade21b63e061.zip | |
- added check of memory leaks in zbx_malloc() (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@4289 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxdb/db.c')
| -rw-r--r-- | src/libs/zbxdb/db.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/zbxdb/db.c b/src/libs/zbxdb/db.c index 1e590d07..5f8d76f0 100644 --- a/src/libs/zbxdb/db.c +++ b/src/libs/zbxdb/db.c @@ -523,7 +523,7 @@ DB_ROW zbx_db_fetch(DB_RESULT result) if(result->fld_num > 0) { - result->values = zbx_malloc(sizeof(char*) * result->fld_num); + result->values = zbx_malloc(result->values, sizeof(char*) * result->fld_num); for(i = 0; i < result->fld_num; i++) { result->values[i] = PQgetvalue(result->pg_result, result->cursor, i); @@ -632,7 +632,7 @@ DB_RESULT zbx_db_vselect(const char *fmt, va_list args) } #endif #ifdef HAVE_POSTGRESQL - result = zbx_malloc(sizeof(ZBX_PG_DB_RESULT)); + result = zbx_malloc(NULL, sizeof(ZBX_PG_DB_RESULT)); result->pg_result = PQexec(conn,sql); result->values = NULL; result->cursor = 0; @@ -671,7 +671,7 @@ DB_RESULT zbx_db_vselect(const char *fmt, va_list args) php_sem_acquire(&sqlite_access); } - result = zbx_malloc(sizeof(ZBX_SQ_DB_RESULT)); + result = zbx_malloc(NULL, sizeof(ZBX_SQ_DB_RESULT)); result->curow = 0; lbl_get_table: |
