Get rid of some stupidity:  

- Added some useful hash table functions (vanilla lookup() and remove()).
  [Actually, I accidentally added them with my previous commit]
  
  Replaced various simple uses of VG_(HT_get_node) with these new functions. 

- Passing record_freemismatch_error() the MAC_Chunk of the freed heap block.
  So now we don't need to call describe_addr() to re-find that block, which
  means that we can remove the MAC_Chunk from the malloc_list earlier, rather
  than having to do a lookup and then later remove it with the stupid removal
  handle returned by VG_(HT_get_node)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4379 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/mac_shared.h b/memcheck/mac_shared.h
index 88b9f3a..bdc895f 100644
--- a/memcheck/mac_shared.h
+++ b/memcheck/mac_shared.h
@@ -394,7 +394,8 @@
                                              Bool isUnaddr, Char* msg );
 extern void MAC_(record_jump_error)        ( ThreadId tid, Addr a );
 extern void MAC_(record_free_error)        ( ThreadId tid, Addr a );
-extern void MAC_(record_freemismatch_error)( ThreadId tid, Addr a );
+extern void MAC_(record_freemismatch_error)( ThreadId tid, Addr a,
+                                             MAC_Chunk* mc);
 extern void MAC_(record_overlap_error)     ( ThreadId tid, 
                                              Char* function, OverlapExtra* oe );
 extern void MAC_(record_illegal_mempool_error) ( ThreadId tid, Addr pool );