From: "Björn Töpel" <bjorn.topel@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org,
bpf@vger.kernel.org
Cc: "Björn Töpel" <bjorn.topel@intel.com>,
magnus.karlsson@intel.com, jonathan.lemon@gmail.com,
ciara.loftus@intel.com, weqaar.a.janjua@intel.com
Subject: [PATCH bpf-next 04/12] selftests/bpf: remove memory leak
Date: Fri, 22 Jan 2021 16:47:17 +0100 [thread overview]
Message-ID: <20210122154725.22140-5-bjorn.topel@gmail.com> (raw)
In-Reply-To: <20210122154725.22140-1-bjorn.topel@gmail.com>
From: Björn Töpel <bjorn.topel@intel.com>
The allocated entry is immediately overwritten by an assignment. Fix
that.
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
---
tools/testing/selftests/bpf/xdpxceiver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c
index 77d1bda37afa..9f40d310805a 100644
--- a/tools/testing/selftests/bpf/xdpxceiver.c
+++ b/tools/testing/selftests/bpf/xdpxceiver.c
@@ -728,7 +728,6 @@ static void worker_pkt_validate(void)
u32 payloadseqnum = -2;
while (1) {
- pkt_node_rx_q = malloc(sizeof(struct pkt));
pkt_node_rx_q = TAILQ_LAST(&head, head_s);
if (!pkt_node_rx_q)
break;
--
2.27.0
next prev parent reply other threads:[~2021-01-22 15:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 15:47 [PATCH bpf-next 00/12] Various cleanups/fixes for AF_XDP selftests Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 01/12] selftests/bpf: remove a lot of ifobject casting Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 02/12] selftests/bpf: remove unused enums Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 03/12] selftests/bpf: fix style warnings Björn Töpel
2021-01-22 15:47 ` Björn Töpel [this message]
2021-01-22 15:47 ` [PATCH bpf-next 05/12] selftests/bpf: improve readability of xdpxceiver/worker_pkt_validate() Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 06/12] selftests/bpf: remove casting by introduce local variable Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 07/12] selftests/bpf: change type from void * to struct ifaceconfigobj * Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 08/12] selftests/bpf: change type from void * to struct generic_data * Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 09/12] selftests/bpf: define local variables at the beginning of a block Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 10/12] selftests/bpf: avoid heap allocation Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 11/12] selftests/bpf: consistent malloc/calloc usage Björn Töpel
2021-01-22 15:47 ` [PATCH bpf-next 12/12] selftests/bpf: avoid useless void *-casts Björn Töpel
2021-01-25 23:10 ` [PATCH bpf-next 00/12] Various cleanups/fixes for AF_XDP selftests patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210122154725.22140-5-bjorn.topel@gmail.com \
--to=bjorn.topel@gmail.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=ciara.loftus@intel.com \
--cc=daniel@iogearbox.net \
--cc=jonathan.lemon@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=weqaar.a.janjua@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).