Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorEugene Tarassov2012-06-07 01:41:38 -0400
committerEugene Tarassov2012-06-07 01:41:38 -0400
commit557ca4272c4f576118e62fc013ea653b24f54c08 (patch)
tree1ae30e54b364127555ff54f4f0eb5ef6add510d2 /server
parent36942af14959e66a58f0dc3cc9f0dcc371cf2674 (diff)
downloadorg.eclipse.tcf.agent-557ca4272c4f576118e62fc013ea653b24f54c08.tar.gz
org.eclipse.tcf.agent-557ca4272c4f576118e62fc013ea653b24f54c08.tar.xz
org.eclipse.tcf.agent-557ca4272c4f576118e62fc013ea653b24f54c08.zip
TCF Server: fixed a memory leak
Diffstat (limited to 'server')
-rw-r--r--server/tcf/services/context-proxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tcf/services/context-proxy.c b/server/tcf/services/context-proxy.c
index c76fd7d8..a645b23a 100644
--- a/server/tcf/services/context-proxy.c
+++ b/server/tcf/services/context-proxy.c
@@ -278,6 +278,7 @@ static void free_context_cache(ContextCache * c) {
for (i = 0; i < c->reg_max; i++) {
loc_free(c->reg_props[i].id);
loc_free(c->reg_props[i].def.role);
+ loc_free(c->reg_props[i].def.name);
}
loc_free(c->reg_props);
}
@@ -1039,7 +1040,7 @@ static void validate_memory_map_cache(Channel * c, void * args, int error) {
json_read_array(&c->inp, read_memory_map_item, cache);
cache->mmap.region_cnt = mem_buf_pos;
cache->mmap.region_max = mem_buf_pos;
- cache->mmap.regions = (MemoryRegion *)loc_alloc(sizeof(MemoryRegion) * mem_buf_pos);
+ cache->mmap.regions = (MemoryRegion *)loc_realloc(cache->mmap.regions, sizeof(MemoryRegion) * mem_buf_pos);
memcpy(cache->mmap.regions, mem_buf, sizeof(MemoryRegion) * mem_buf_pos);
if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX);

Back to the top