diff options
-rw-r--r-- | tests/libs/zbxdbcache/Makefile.am | 1 | ||||
-rw-r--r-- | tests/mocks/valuecache/valuecache_mock.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/libs/zbxdbcache/Makefile.am b/tests/libs/zbxdbcache/Makefile.am index 42bf097c01d..4cecca22612 100644 --- a/tests/libs/zbxdbcache/Makefile.am +++ b/tests/libs/zbxdbcache/Makefile.am @@ -81,6 +81,7 @@ COMMON_WRAP_FUNCS = \ -Wl,--wrap=zbx_mutex_create \ -Wl,--wrap=zbx_mutex_destroy \ -Wl,--wrap=zbx_mem_create \ + -Wl,--wrap=zbx_mem_destroy \ -Wl,--wrap=__zbx_mem_malloc \ -Wl,--wrap=__zbx_mem_realloc \ -Wl,--wrap=__zbx_mem_free \ diff --git a/tests/mocks/valuecache/valuecache_mock.c b/tests/mocks/valuecache/valuecache_mock.c index 323bc8fc773..227aa566a40 100644 --- a/tests/mocks/valuecache/valuecache_mock.c +++ b/tests/mocks/valuecache/valuecache_mock.c @@ -45,6 +45,7 @@ int __wrap_zbx_mutex_create(zbx_mutex_t *mutex, zbx_mutex_name_t name, char **er void __wrap_zbx_mutex_destroy(zbx_mutex_t *mutex); int __wrap_zbx_mem_create(zbx_mem_info_t **info, zbx_uint64_t size, const char *descr, const char *param, int allow_oom, char **error); +void __wrap_zbx_mem_destroy(zbx_mem_info_t *info); void *__wrap___zbx_mem_malloc(const char *file, int line, zbx_mem_info_t *info, const void *old, size_t size); void *__wrap___zbx_mem_realloc(const char *file, int line, zbx_mem_info_t *info, void *old, size_t size); void __wrap___zbx_mem_free(const char *file, int line, zbx_mem_info_t *info, void *ptr); @@ -537,6 +538,11 @@ int __wrap_zbx_mem_create(zbx_mem_info_t **info, zbx_uint64_t size, const char * return SUCCEED; } +void __wrap_zbx_mem_destroy(zbx_mem_info_t *info) +{ + zbx_free(info); +} + void *__wrap___zbx_mem_malloc(const char *file, int line, zbx_mem_info_t *info, const void *old, size_t size) { size_t *psize; |