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
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
size_t t_len = len - (blocksize ? (len % blocksize) : 0);
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);
- char *dst = rte_pktmbuf_append(m, t_len);
+ memset(m->buf_addr, 0, m->buf_len);
+ dst = rte_pktmbuf_append(m, t_len);
if (!dst) {
rte_pktmbuf_free(m);
return NULL;
if (!dst) {
rte_pktmbuf_free(m);
return NULL;