From: adash Date: Wed, 14 Mar 2007 00:40:20 +0000 (+0000) Subject: small changes, prevent memory leak, add free and change cachehashtable_t X-Git-Tag: preEdgeChange~661 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cf2952358cd22db4e79141b0177a1789d1d950dd;p=IRC.git small changes, prevent memory leak, add free and change cachehashtable_t to chashtable --- diff --git a/Robust/src/Runtime/DSTM/interface/clookup.c b/Robust/src/Runtime/DSTM/interface/clookup.c index 4fd11cbe..aa014698 100644 --- a/Robust/src/Runtime/DSTM/interface/clookup.c +++ b/Robust/src/Runtime/DSTM/interface/clookup.c @@ -13,6 +13,7 @@ chashtable_t *chashCreate(unsigned int size, float loadfactor) { // Allocate space for the hash table if((nodes = calloc(size, sizeof(chashlistnode_t))) == NULL) { printf("Calloc error %s %d\n", __FILE__, __LINE__); + free(ctable); return NULL; } diff --git a/Robust/src/Runtime/DSTM/interface/dstm.h b/Robust/src/Runtime/DSTM/interface/dstm.h index d7278ea6..fdfd0951 100644 --- a/Robust/src/Runtime/DSTM/interface/dstm.h +++ b/Robust/src/Runtime/DSTM/interface/dstm.h @@ -26,7 +26,7 @@ typedef struct objstr { typedef struct transrecord { objstr_t *cache; - cachehashtable_t *lookupTable; + chashtable_t *lookupTable; } transrecord_t; /* Initialize main object store and lookup tables, start server thread. */