]> granicus.if.org Git - libevent/commitdiff
Make sure the test case for mem_functions hits strdup too.
authorNick Mathewson <nickm@torproject.org>
Tue, 21 Apr 2009 18:48:05 +0000 (18:48 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 21 Apr 2009 18:48:05 +0000 (18:48 +0000)
svn:r1218

test/regress.c

index 9dc9ffa74f80e4c7587f55b87918588de5ada393..2a9d250712f9893d1ea31f810c5a090f6ee4aa00 100644 (file)
@@ -1575,11 +1575,16 @@ static void
 test_mm_functions(void *arg)
 {
        struct event_base *b = NULL;
+       struct event_config *cfg = NULL;
        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(check_dummy_mem_ok(b));
 end:
+       if (cfg)
+               event_config_free(cfg);
        if (b)
                event_base_free(b);
 }