Commit 3957fd7d authored by Beat Küng's avatar Beat Küng

surface matching: fix memory leak

parent ac5ffe31
...@@ -347,7 +347,10 @@ hashtable_int *hashtableRead(FILE* f) ...@@ -347,7 +347,10 @@ hashtable_int *hashtableRead(FILE* f)
{ {
data=malloc(dataSize); data=malloc(dataSize);
if (!data) if (!data)
{
hashtableDestroy(hashtbl);
return NULL; return NULL;
}
status = fread(data, dataSize, 1, f); status = fread(data, dataSize, 1, f);
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment