File mhash-0.9.9.9-fix-mem-leak.patch of Package mhash

diff -up mhash-0.9.9.9/lib/mhash.c.BAD mhash-0.9.9.9/lib/mhash.c
--- mhash-0.9.9.9/lib/mhash.c.BAD	2009-07-02 16:57:43.872049877 -0400
+++ mhash-0.9.9.9/lib/mhash.c	2009-07-02 16:58:03.909029777 -0400
@@ -719,6 +719,8 @@ WIN32DLL_DEFINE MHASH mhash_restore_stat
 	mutils_memcpy( &ret->state_size, &mem[pos], sizeof(ret->state_size));
 	pos += sizeof( ret->state_size);
 
+	if (ret->state)
+		mutils_free(ret->state);
 	ret->state = mutils_malloc(ret->state_size);
 	if (ret->state==NULL)
 		goto freeall;