Skip to content

Commit

Permalink
coio: fix cord leak on stop
Browse files Browse the repository at this point in the history
cord_ptr variable is calloc()-ated in coio_on_start()
and is not free()-ed, which triggers ASAN. free() it
in coio_on_stop().

Closes #5308

(cherry picked from commit 8477b6c)
  • Loading branch information
kyukhin committed Sep 23, 2020
1 parent ec2976d commit 6acdf42
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions asan/lsan.supp
Expand Up @@ -43,8 +43,6 @@ leak:tt_bitset_iterator_init
leak:libc.so*

# test: box-tap/schema_mt.test.lua
# source: src/lib/core/coio_task.c
leak:coio_on_start
# source: src/lib/salad/mhash.h
leak:mh_i32ptr_new

Expand Down
1 change: 1 addition & 0 deletions src/lib/core/coio_task.c
Expand Up @@ -123,6 +123,7 @@ coio_on_stop(void *data)
{
(void) data;
cord_destroy(cord());
free(cord());
return 0;
}

Expand Down

0 comments on commit 6acdf42

Please sign in to comment.