mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-05 18:30:32 -04:00
Make sure the test case for mem_functions hits strdup too.
svn:r1218
This commit is contained in:
parent
d3fbe7fa05
commit
133a015dba
@ -1575,11 +1575,16 @@ static void
|
|||||||
test_mm_functions(void *arg)
|
test_mm_functions(void *arg)
|
||||||
{
|
{
|
||||||
struct event_base *b = NULL;
|
struct event_base *b = NULL;
|
||||||
|
struct event_config *cfg = NULL;
|
||||||
event_set_mem_functions(dummy_malloc, dummy_realloc, dummy_free);
|
event_set_mem_functions(dummy_malloc, dummy_realloc, dummy_free);
|
||||||
b = event_base_new();
|
cfg = event_config_new();
|
||||||
|
event_config_avoid_method(cfg, "Nonesuch");
|
||||||
|
b = event_base_new_with_config(cfg);
|
||||||
tt_assert(b);
|
tt_assert(b);
|
||||||
tt_assert(check_dummy_mem_ok(b));
|
tt_assert(check_dummy_mem_ok(b));
|
||||||
end:
|
end:
|
||||||
|
if (cfg)
|
||||||
|
event_config_free(cfg);
|
||||||
if (b)
|
if (b)
|
||||||
event_base_free(b);
|
event_base_free(b);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user