compress/isal: fix use after free
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 21 May 2019 14:47:13 +0000 (07:47 -0700)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 5 Jul 2019 12:52:25 +0000 (14:52 +0200)
commitabdb798ae22ee4374e9152580f22ff5fb42193a0
tree7efb044741ac0a424d001ae17983cfdb0ffb9f20
parente7d49fcdef7378f5c661180267bd9df0dd2e0525
compress/isal: fix use after free

The release function was using qp->stream after already
releasing it and the null pointer checking was missing.

Also since rte_free(NULL) is a no-op, remove unnecessary
checks for NULL.

Coverity issure: 340860
Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
drivers/compress/isal/isal_compress_pmd_ops.c