X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=wrapper.c;h=8d7dd31c4ba5439652d11e5ada06e0d52bc04e4f;hb=cf2ad8e64175bcf4b2bb693a9e4c0a89076111dd;hp=4c1639f1536d259a2b64d574005ac973d042b273;hpb=73fd7f3761eeef0e28bbf04727c8a1e751a9792e;p=thirdparty%2Fgit.git diff --git a/wrapper.c b/wrapper.c index 4c1639f153..8d7dd31c4b 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; }