From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C54F5A0545 for ; Tue, 11 Oct 2022 16:21:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A880D42E46; Tue, 11 Oct 2022 16:21:30 +0200 (CEST) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by mails.dpdk.org (Postfix) with ESMTP id 7AA4542E0D; Tue, 11 Oct 2022 16:21:27 +0200 (CEST) Received: by mail-qt1-f182.google.com with SMTP id jr1so286731qtb.0; Tue, 11 Oct 2022 07:21:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qf/f0zYWIVOvALL1W37LAWuDUxYHP9kYVY8JMOcN8s4=; b=RbQz7ZCwfBnfbFHEx24jbZytwVdBldUGFgUDCeL/+fMpdHMb29UeU6zY2v7/vfcSAN RD9hl6TlMmUD4aRLpH92py++Uc6RBYdy5xqvEBbbKLVWDkjNqObAyXba98JvNlT+QHW4 USADBCNC88TKdS39GtF7IYi3SsbagYMAluWjQNKAIEU0Tb/E3BUj4dlYNy3BYosyYonV YCFU6Rurjjqi3kUtwhLy9LUtBgyLrlMhwxQDdO8NvxVxtcSrkLUoWrV0U+iNByARJiuF EM3yMufaJyuNjyeYMBw74ImfIGa9N0QS7stQ5zLR+o7mfHskjYKnXJhW+RTF7S+rFwDO eWRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qf/f0zYWIVOvALL1W37LAWuDUxYHP9kYVY8JMOcN8s4=; b=5fut02HRrRZ0zCK525oN9cg3dIpnCg/niLAcVrIExwsze/GwXRgGz0nhrBVHHMholV wbvO7F3mMqCv+AOz9/uTNge7ESD+r6RBj4PIkWQ3b3O48mtpdbFCH4HzLBgv/Beh3Bd5 hHFy2uB7d9LPPW4pSQzBkCZ3LzU4bsyOAXi1zTGv1NDVSKRRM5koou9/0iW4Bok7ldwZ jTbylDmXr9JE8ZfIJQFcl10NFlpI/l0iIRHVEF3YRMr2qB5fJNoi4vmZ0vXOgIJjZZsF vZxE7GlmFd0nDxyFEymEVRaxnftktDiK5dDAg/tDKZs7dUZSqvBBP8Zo9iKVqk5X/Juo aI5A== X-Gm-Message-State: ACrzQf2F2+/Y/4usA/KQfog05i08wae52hirQFuGA0XXDlzjiKQMS2Oh vmRNOT7tKvrL2Dep1EpU1eBVfELrSiY6n8+6PggBw4G1Lgg= X-Google-Smtp-Source: AMsMyM7YGaBr2qT54nZo6E0wkEPbc0DDPpjaj7J5DU+r9fiSVzK7q4BkqMJKwPVJFv5Ex1PaH7NPsACzGGKG13WBI3o= X-Received: by 2002:a05:622a:1651:b0:38f:2829:a1fe with SMTP id y17-20020a05622a165100b0038f2829a1femr19448069qtj.173.1665498086909; Tue, 11 Oct 2022 07:21:26 -0700 (PDT) MIME-Version: 1.0 References: <20220921120359.2201131-1-david.marchand@redhat.com> <20221004094418.196544-1-david.marchand@redhat.com> <20221004094418.196544-4-david.marchand@redhat.com> In-Reply-To: <20221004094418.196544-4-david.marchand@redhat.com> From: Jerin Jacob Date: Tue, 11 Oct 2022 19:51:01 +0530 Message-ID: Subject: Re: [PATCH v2 3/9] trace: fix leak with regexp To: David Marchand Cc: dev@dpdk.org, skori@mavell.com, jerinj@marvell.com, stable@dpdk.org, Sunil Kumar Kori Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, Oct 4, 2022 at 3:14 PM David Marchand wrote: > > The precompiled buffer initialised in regcomp must be freed before > leaving rte_trace_regexp. > > Fixes: 84c4fae4628f ("trace: implement operation APIs") > Cc: stable@dpdk.org > > Signed-off-by: David Marchand Acked-by: Jerin Jacob > --- > Changes since v1: > - split patch in two, keeping only the backportable fix as patch 3, > > --- > lib/eal/common/eal_common_trace.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c > index 1b86f5d2d2..1db11e3e14 100644 > --- a/lib/eal/common/eal_common_trace.c > +++ b/lib/eal/common/eal_common_trace.c > @@ -218,8 +218,10 @@ rte_trace_regexp(const char *regex, bool enable) > rc = rte_trace_point_disable(tp->handle); > found = 1; > } > - if (rc < 0) > - return rc; > + if (rc < 0) { > + found = 0; > + break; > + } > } > regfree(&r); > > -- > 2.37.3 >