From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62CCEA04E7; Tue, 3 Nov 2020 22:36:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33ED09B04; Tue, 3 Nov 2020 22:36:43 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 900E669A4 for ; Tue, 3 Nov 2020 22:36:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604439400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OTAfyNtTqfliPrCBTxiX6p6FsBNmQCWxZZh+0HAaXbc=; b=IGV6AMO/lMEgU2s0F4gNUFku/04jNZNYSf687KKbKmeoIVPYpVIslA0lgBG9tshcGJF0eC Rr1ik9aKvchwEZ1QddOqIaWYFDaiwfVF4XobLIaHLiq1kw52JX5d014R6rdgbhhYuWw6Sp olqNBJ9WYoQcsMlelrIvCYEn3YQ3L6w= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-75-zffdm8qMM3qGx-Jr8UYYcw-1; Tue, 03 Nov 2020 16:36:38 -0500 X-MC-Unique: zffdm8qMM3qGx-Jr8UYYcw-1 Received: by mail-vk1-f198.google.com with SMTP id b14so3302693vka.21 for ; Tue, 03 Nov 2020 13:36:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OTAfyNtTqfliPrCBTxiX6p6FsBNmQCWxZZh+0HAaXbc=; b=lNRs/sbqKVa8l5Rw1TygcqNqayjkNnh6Y/zxMI+ppk8MSxDFAytNNqAdboMljJPpc9 U0x2ZH7MhjQhYSvcYtc2zKBNza3/Anan0faK0nmJ5GQ8gpXDGUY86ztJKDhePV2lM9oF H8GNzSQmVapystrh2crKn3XpEVPW5ArJn8l23mDFFyW7dTex6MyRxCuXoyd92dSg3Z5F NNMrTOuUrWUfnM28UGKlu+lXUGNyTgPZXgYSZr/lgT0vaF7iCYuwgxFIggzS2LGHhT56 ExYQaYF5hPHkYL9o/no/5ZOaqae0WSI3HIrZS8MHIsRHk+3uArhwCXUpEuV0EQlL6eE2 pRRw== X-Gm-Message-State: AOAM531ZFpeg0+2aanVckSZvmUpOSRDSPQneeKJ/arXAXNn++10gF7bx LuUPQGWuSo2xaa76LTodgsTkACaFqSmHJZRbcsP0MJRBF5xxh0L4THfbyZbOZCyJZjUvvY+5bFv LfUT4JC6XapVaM8xfn9A= X-Received: by 2002:a67:2fca:: with SMTP id v193mr20765004vsv.18.1604439397928; Tue, 03 Nov 2020 13:36:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3f9PtexzmqKRVnNA9P2z9JCJon91MwTdlGqORWN8FluhBtvCRWW3gcNoluPYcq83L1C/vg/OhvXAkYbS5Y4A= X-Received: by 2002:a67:2fca:: with SMTP id v193mr20764996vsv.18.1604439397764; Tue, 03 Nov 2020 13:36:37 -0800 (PST) MIME-Version: 1.0 References: <20200917150341.66298-1-ciara.power@intel.com> In-Reply-To: <20200917150341.66298-1-ciara.power@intel.com> From: David Marchand Date: Tue, 3 Nov 2020 22:36:26 +0100 Message-ID: To: Ciara Power Cc: dev , dpdk stable , Keith Wiles , Gaurav Singh , Honnappa Nagarahalli Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] metrics: fix resource leak on memory allocation fail X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Sep 17, 2020 at 5:06 PM Ciara Power wrote: > > If an error occurred when allocating memory for metrics or names, > the function returned without freeing allocated memory. This is now > fixed to avoid the resource leak in the case that either metrics or > names had been successfully allocated memory. > > Coverity issue: 362053 > Fixes: c5b7197f662e ("telemetry: move some functions to metrics library") > Cc: stable@dpdk.org > Gaurav reported the same issue and proposed a patch, but I went with yours as it describes the issue, is minimal and has the proper tags for backport. Reported-by: Gaurav Singh > Signed-off-by: Ciara Power Acked-by: John McNamara Applied, thanks. -- David Marchand