From: Aleksey Demakov Date: Tue, 6 Nov 2012 14:13:21 +0000 (+0300) Subject: Fix a memory leak in dpas. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=e6a774b252f2bc900a4dcb43ae841603bc0f00ac;p=francis%2Flibjit.git Fix a memory leak in dpas. --- diff --git a/ChangeLog b/ChangeLog index 0a945a0..7469571 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2012-11-06 Aleksey Demakov + * dpas/dpas-scope.c (dpas_scope_destroy): Fix a memory leak in dpas. + * include/jit/jit-memory.h, jit/jit-internal.h, jit/jit-memory.c * jit-cache.c: restore ability to allocate memory for recompiled functions. diff --git a/dpas/dpas-scope.c b/dpas/dpas-scope.c index e9b1878..15a7bf3 100644 --- a/dpas/dpas-scope.c +++ b/dpas/dpas-scope.c @@ -87,6 +87,10 @@ void dpas_scope_destroy(dpas_scope_t scope) { jit_free(item->name); } + if(item->filename) + { + jit_free(item->filename); + } if(item->free_info) { (*(item->free_info))(item->info); @@ -103,6 +107,10 @@ void dpas_scope_destroy(dpas_scope_t scope) { jit_free(item->name); } + if(item->filename) + { + jit_free(item->filename); + } if(item->free_info) { (*(item->free_info))(item->info);