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 0727245AE3 for ; Tue, 8 Oct 2024 18:49:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D87840E1F; Tue, 8 Oct 2024 18:49:03 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id F3E8740A84 for ; Tue, 8 Oct 2024 18:48:56 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7ea0ff74b15so1513912a12.3 for ; Tue, 08 Oct 2024 09:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728406136; x=1729010936; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BQnVRLS9RVade0SF+35UhovJ/CilP2OUV6lgWglyO6Q=; b=mIEYUYnqxnr0EXTvv92Kl4wbBhAM7DkCDJzv7LrJQm0Wo/8knHhnxfpphqfEQG8w4R 0FaU4PA6FTfrApalyx/OTG+Udsq9u5R7HCZ+K17/WQqTfN1G4rXDjDj5l9jYRBgpA6gI qSxOFiYlio2IN4EJQP3/xcj4bHPm5ICgfNvVDEhZTNy/8IEpqvu7f2b9R1w9GQ9na8dt Pq28pNehzYILZqz6vWsxWSTKyejjpR4w1YcYjZd6YfBjwuoICqyhdgnWqTssfDoJqbI5 Emf8yfBV2wN4MLLwDppK2UZRKWxIwsbiRBb8KVOYVBTXebedT1oLy+m9onYvoESFmNM1 Zkuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728406136; x=1729010936; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BQnVRLS9RVade0SF+35UhovJ/CilP2OUV6lgWglyO6Q=; b=OfnZ/Oww/pBX0DbQasI7vHpbVn4CpJqINT6TlPDI+dmwp0Dih//6KVD4eQbhwKe1jJ 6HgT66tNdVpL0RBBys/V5ugICGptr9kTj37o2Y2apEwb50F6O4MkKQ08bhruTHm5Fr7+ cgM3B1/FTX5dS3LZAR0YFYj+YkRLPAHswQXgk1vr26Zz8xj0Vo6TMTej5TdaJQy60z3h /3D3Ry1rD7+DL2sUPpRXIdT+VDcrw/gNud5MKcOo6Q7mAYyARePG9hPPkG5eTmOtmc+i Az4hNyqefgIS4g1CLmnglKwkvJwhJ8w2bK8OMzHOib1x19QD4xC0aTMQGZbM1ULV5TTa HyIA== X-Forwarded-Encrypted: i=1; AJvYcCUZZKTdS3T65kee11x3GqvoYRc/po6dvlGW1iRcLFVdQN4iF1jtmygzhziJRYBcbVRJUPqAyTI=@dpdk.org X-Gm-Message-State: AOJu0YzzKq+5mtOUO/O3lZXaNLj0Ykfua7bUD+DgRJ1aLeqBONU30Pov ImUZtY+v8SIamnKP1nHSbzwG/3kz2ZImSAqZU9DDd10eDEeHNsgqUXNy57iKrkQ= X-Google-Smtp-Source: AGHT+IHReYt3IHwWDsKlHv/vJnzYeiXluWMRrNmn5C/LeM5UoxcTsZlMZm1jP7tJiV8z4VP5cZmNyQ== X-Received: by 2002:a17:903:192:b0:20b:8bf5:cd72 with SMTP id d9443c01a7336-20bfeb51b33mr217616765ad.49.1728406136258; Tue, 08 Oct 2024 09:48:56 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c54056bd9sm13832965ad.85.2024.10.08.09.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 09:48:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , sthotton@marvell.com, stable@dpdk.org, Pavan Nikhilesh Subject: [PATCH v9 04/17] event/cnxk: fix free of non-heap in cleanup code Date: Tue, 8 Oct 2024 09:47:08 -0700 Message-ID: <20241008164842.139045-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241008164842.139045-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241008164842.139045-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The code to cleanup in case of error would derefence null pointer then pass that result to rte_free. Fixes: 97a05c1fe634 ("event/cnxk: add port config") Cc: sthotton@marvell.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/event/cnxk/cnxk_eventdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c index 4b2d6bffa6..8cc1adef11 100644 --- a/drivers/event/cnxk/cnxk_eventdev.c +++ b/drivers/event/cnxk/cnxk_eventdev.c @@ -121,8 +121,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev, return 0; hws_fini: for (i = i - 1; i >= 0; i--) { - event_dev->data->ports[i] = NULL; rte_free(cnxk_sso_hws_get_cookie(event_dev->data->ports[i])); + event_dev->data->ports[i] = NULL; } return -ENOMEM; } -- 2.45.2