diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-21 09:24:18 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-21 09:25:14 -0800 |
commit | 00b0d7f77b65ed2d059f893bbd2011ba5bb4252d (patch) | |
tree | fe34aef50ca3aba79424e5e6f13f6e853135d778 /wrapper.c | |
parent | 6068ac88488f01400eae5c063d8e4a08e9d87f74 (diff) | |
download | git-00b0d7f77b65ed2d059f893bbd2011ba5bb4252d.tar.gz |
set_try_to_free_routine(NULL) means "do nothing special"
This way, the next caller that wants to disable our memory reclamation
machinery does not have to define its own do_nothing() stub.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wrapper.c')
-rw-r--r-- | wrapper.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |