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 5C3BAA00C2; Thu, 3 Feb 2022 07:02:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F69841199; Thu, 3 Feb 2022 07:02:26 +0100 (CET) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 7B81440151 for ; Thu, 3 Feb 2022 07:02:25 +0100 (CET) Received: by mail-pg1-f176.google.com with SMTP id g20so1427253pgn.10 for ; Wed, 02 Feb 2022 22:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iqqRgLwzdPXzKcGKSaLd7o6thyXJPkqWHDFetzReOTk=; b=LacXczfREmohD0SvOA4obKcX0IAufL2SrrvXlwxAIjyC2o3LVHgBYvnbjfNMaFnGcF KYlrkZUKfCtrc6gfk7fTkUHCakhjULkxTAdJnC+qq9RlLM+Drx7LkJjCTaf7GyBhNbiD lrQmb7bJ5FPBrOo8rEhaCovkcAZci89/2QNQAYSJpdK47MsXFSzdGBVDrwHpQf80i3rL Vt10fovXwkoqzMPBO+HEp+P1ZkeVqOl9r+6npgjIr0YyiCgAcGq5R0r0qOmgfMooJyyt tA4if2qLDDBAHoYzDMbkMKYf5BAt+JnWXucsN+Zw4bskviQojdB0D6v2v8SxJ2NCv5k9 lWRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iqqRgLwzdPXzKcGKSaLd7o6thyXJPkqWHDFetzReOTk=; b=v9mbCM3BMdAyf1L42JpNZm3196c4o7sS4eTiz9usImosk4v6blW5q9dgSPvlcy3d6J Fex7xxaWzhhm0RO7DSd1u8a321vqWM1/QJSabRU4wCKUf8ywJpuOICMjPiJNPYUhcNno ra451eSRBoQzjlU2+lNaC5sxtTe6laFwTDhONDXD4Rt9RvyUs7DWOxA9J5fTrI37ZrSF kYWRRT3qo1UGX6f0pCKDv52g4LAhGGGzGJW2TRVqTuArHQJjOCLLpuIIHaO7dwbnlMUc 7FIZqgyTFGGlzL6v2d7GgUBP1dLCQHN/xvzM0dlw8Ffsmg1Rm4FIHReXg6U1B0KP7k7W ecNw== X-Gm-Message-State: AOAM531FsmchoJfbCFY9i+oSzXKATePmLnHdCyvgp8M59Pn9s0urnI7L WTlJj3htdfgfKG7pQrVKIEbpcQ== X-Google-Smtp-Source: ABdhPJzjVekhRqs96oBJ9hjbPyJEJuN5eD2xXClSXDlwoIOAD8itxWVt8lg4GZmvsI7o+quh2a40Zw== X-Received: by 2002:a63:8648:: with SMTP id x69mr22795081pgd.25.1643868144660; Wed, 02 Feb 2022 22:02:24 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id g9sm28822839pfc.109.2022.02.02.22.02.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 22:02:24 -0800 (PST) Date: Wed, 2 Feb 2022 22:02:21 -0800 From: Stephen Hemminger To: Weiguo Li Cc: jay.jayatheerthan@intel.com, ganapati.kundapura@intel.com, s.v.naga.harish.k@intel.com, dev@dpdk.org Subject: Re: [PATCH] eventdev/eth_rx: fix memory leak when token parsing finished Message-ID: <20220202220221.04c0a04e@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 2 Feb 2022 15:13:22 +0800 Weiguo Li wrote: > The memory get from strdup should be freed when parameter parsing > finished, and also should be freed when error occurs. > > Fixes: 814d01709328 ("eventdev/eth_rx: support telemetry") > Fixes: 9e583185318f ("eventdev/eth_rx: support telemetry") > > Signed-off-by: Weiguo Li strdupa() is easier to use here instead of strdup(). Also, the code is not checking for strdup failing...