From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C0A7B469719 for ; Tue, 22 Sep 2020 18:10:32 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id a22so14392895ljp.13 for ; Tue, 22 Sep 2020 08:10:32 -0700 (PDT) Date: Tue, 22 Sep 2020 18:10:27 +0300 From: Cyrill Gorcunov Message-ID: <20200922151027.GD28461@grain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH] coio: fix cord leak on stop List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org On Tue, Sep 22, 2020 at 05:59:47PM +0300, Kirill Yukhin wrote: > 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 > --- > > Branch: https://github.com/tarantool/tarantool/tree/kyukhin/gh-5308-cord-leak > Issue: https://github.com/tarantool/tarantool/issues/5308 > ChangeLog: not user visible > > src/lib/core/coio_task.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/lib/core/coio_task.c b/src/lib/core/coio_task.c > index 83f669d..c8be2de 100644 > --- a/src/lib/core/coio_task.c > +++ b/src/lib/core/coio_task.c > @@ -123,6 +123,7 @@ coio_on_stop(void *data) > { > (void) data; > cord_destroy(cord()); > + free(cord()); > return 0; > } Ack.