Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/tcf/services/context-proxy.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tcf/services/context-proxy.c b/server/tcf/services/context-proxy.c
index a2383aea..699637a4 100644
--- a/server/tcf/services/context-proxy.c
+++ b/server/tcf/services/context-proxy.c
@@ -1399,6 +1399,20 @@ static void read_memory_map_item(InputStream * inp, void * args) {
mem_buf_pos++;
}
}
+ if (m == mem_buf + mem_buf_pos) {
+ /* Unused entry, need to free memory */
+ loc_free(m->file_name);
+ loc_free(m->sect_name);
+ loc_free(m->query);
+ loc_free(m->id);
+ while (m->attrs != NULL) {
+ MemoryRegionAttribute * x = m->attrs;
+ m->attrs = x->next;
+ loc_free(x->name);
+ loc_free(x->value);
+ loc_free(x);
+ }
+ }
}
static void validate_memory_map_cache(Channel * c, void * args, int error) {

Back to the top