memzap

replay memory writes
git clone git://git.2f30.org/memzap
Log | Files | Refs | README | LICENSE

commit a260739367a4e344eae9de5d1d997ee3c50ce667
parent 41bb2b3c5523f33a9119b2493171358c19ac3449
Author: sin <sin@2f30.org>
Date:   Fri,  1 Mar 2013 12:08:10 +0000

mem: It is unneeded to set pointers to NULL after free-ing them

Diffstat:
Mmem.c | 4----
1 file changed, 0 insertions(+), 4 deletions(-)

diff --git a/mem.c b/mem.c @@ -119,7 +119,6 @@ free_mem_region(struct mem_region *mr) return; free(mr->mblks); - mr->mblks = NULL; free(mr); } @@ -210,7 +209,6 @@ free_mem_tree(struct mem_tree *mt) next = RB_NEXT(mem_tree, mt, me); RB_REMOVE(mem_tree, mt, me); free(me->mblks); - me->mblks = NULL; free(me); } free(mt); @@ -343,9 +341,7 @@ free_mem_region_diff(struct mem_region_diff *rdiff) for (i = 0; i < rdiff->nmrdiffs; i++) { mdiff = &rdiff->mrdiffs[i]; free(mdiff->buf); - mdiff->buf = NULL; } free(rdiff->mrdiffs); - rdiff->mrdiffs = NULL; free(rdiff); }