compressdev: fix op allocation
authorFiona Trahe <fiona.trahe@intel.com>
Sat, 27 Oct 2018 00:43:07 +0000 (01:43 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 2 Nov 2018 11:25:39 +0000 (12:25 +0100)
commit30fadd8bc9d4b550f854a5c76ee62bf02fea8b3e
tree5cb35f10ab7f94a12d8c691cbe7652f107e8471e
parent1fca14d7dd4fed32e67cb2622546552c57b00c38
compressdev: fix op allocation

Fixed bad logic in rte_comp_op_alloc() checking return
value from rte_comp_op_raw_bulk_alloc(). This
could have resulted in a seg-fault in error case.
Made rte_comp_ob_bulk_alloc() code consistent
with rte_comp_op_alloc().

Fixes: 96086db5a369 ("compressdev: add operation management")
Cc: stable@dpdk.org
Reported-by: Sabyasachi Sengupta <sabyasg@hpe.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
lib/librte_compressdev/rte_comp.c