* [dpdk-stable] [PATCH] test/test_cryptodev: do not use a possibly NULL Pointer
@ 2021-05-24 9:01 Thierry Herbelot
2021-06-29 20:34 ` [dpdk-stable] [EXT] [dpdk-dev] " Akhil Goyal
0 siblings, 1 reply; 2+ messages in thread
From: Thierry Herbelot @ 2021-05-24 9:01 UTC (permalink / raw)
To: dev; +Cc: Thierry Herbelot, Thomas Monjalon, stable, Declan Doherty
Use m only after it was checked not to be NULL.
Fixes: 202d375c60bc1 ("app/test: add cryptodev unit and performance tests")
Cc: stable@dpdk.org
Cc: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
app/test/test_cryptodev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 39db52b17a2e..3c9770f6ea81 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -135,10 +135,11 @@ setup_test_string(struct rte_mempool *mpool,
struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
size_t t_len = len - (blocksize ? (len % blocksize) : 0);
- memset(m->buf_addr, 0, m->buf_len);
if (m) {
- char *dst = rte_pktmbuf_append(m, t_len);
+ char *dst;
+ memset(m->buf_addr, 0, m->buf_len);
+ dst = rte_pktmbuf_append(m, t_len);
if (!dst) {
rte_pktmbuf_free(m);
return NULL;
--
2.29.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [EXT] [dpdk-dev] [PATCH] test/test_cryptodev: do not use a possibly NULL Pointer
2021-05-24 9:01 [dpdk-stable] [PATCH] test/test_cryptodev: do not use a possibly NULL Pointer Thierry Herbelot
@ 2021-06-29 20:34 ` Akhil Goyal
0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2021-06-29 20:34 UTC (permalink / raw)
To: Thierry Herbelot, dev; +Cc: Thomas Monjalon, stable, Declan Doherty
> Use m only after it was checked not to be NULL.
>
> Fixes: 202d375c60bc1 ("app/test: add cryptodev unit and performance
> tests")
> Cc: stable@dpdk.org
> Cc: Declan Doherty <declan.doherty@intel.com>
>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-29 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 9:01 [dpdk-stable] [PATCH] test/test_cryptodev: do not use a possibly NULL Pointer Thierry Herbelot
2021-06-29 20:34 ` [dpdk-stable] [EXT] [dpdk-dev] " Akhil Goyal
patches for DPDK stable branches
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
stable@dpdk.org
public-inbox-index stable
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.stable
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git