]> granicus.if.org Git - libevent/commitdiff
Make regress_finalize work with malloc replacement disabled
authorNick Mathewson <nickm@torproject.org>
Tue, 30 Apr 2013 18:40:50 +0000 (14:40 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 30 Apr 2013 18:40:50 +0000 (14:40 -0400)
test/regress_finalize.c

index d2916ab137da5067a1c4307aca44c03ef46a589e..2bcab8ba492845b9ce9ad46a075db43c6e5b0a70 100644 (file)
@@ -158,6 +158,7 @@ end:
        ;
 }
 
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
 static void *
 tfff_malloc(size_t n)
 {
@@ -181,12 +182,15 @@ tfff_realloc(void *p, size_t sz)
 {
        return realloc(p,sz);
 }
+#endif
 
 static void
 test_fin_free_finalize(void *arg)
 {
+#ifdef EVENT__DISABLE_MM_REPLACEMENT
+       tinytest_set_test_skipped_();
+#else
        struct event_base *base = NULL;
-
        struct event *ev, *ev2;
        int ev_called = 0;
        int ev2_called = 0;
@@ -218,6 +222,7 @@ test_fin_free_finalize(void *arg)
 end:
        if (base)
                event_base_free(base);
+#endif
 }
 
 /* For test_fin_within_cb */