From 3957fd7d6fca1f0d5a97a314962005d017cdb37e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Sun, 28 Dec 2014 12:39:46 +0100 Subject: [PATCH] surface matching: fix memory leak --- modules/surface_matching/src/t_hash_int.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/surface_matching/src/t_hash_int.cpp b/modules/surface_matching/src/t_hash_int.cpp index 52742f376..8e86e8159 100644 --- a/modules/surface_matching/src/t_hash_int.cpp +++ b/modules/surface_matching/src/t_hash_int.cpp @@ -347,7 +347,10 @@ hashtable_int *hashtableRead(FILE* f) { data=malloc(dataSize); if (!data) + { + hashtableDestroy(hashtbl); return NULL; + } status = fread(data, dataSize, 1, f); } else