X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=wrapper.c;h=8d7dd31c4ba5439652d11e5ada06e0d52bc04e4f;hb=60adf7d73e44126289a98dada60f9c335ffc84b0;hp=4c1639f1536d259a2b64d574005ac973d042b273;hpb=905ffa44248ce1578d22b342eb6c522da90e2f61;p=git.git diff --git a/wrapper.c b/wrapper.c index 4c1639f15..8d7dd31c4 100644 --- a/wrapper.c +++ b/wrapper.c @@ -12,6 +12,8 @@ static void (*try_to_free_routine)(size_t size) = do_nothing; try_to_free_t set_try_to_free_routine(try_to_free_t routine) { try_to_free_t old = try_to_free_routine; + if (!routine) + routine = do_nothing; try_to_free_routine = routine; return old; }