Skip to content

Commit

Permalink
compress/zlib: fix error handling
Browse files Browse the repository at this point in the history
[ upstream commit ff53baa ]

Add missing return after setting the error status in case of
invalid flush_flag in the operation.
The issue was found by the coverity scan as the fin_flush variable,
not initialized in such case, was used later in the flow.

Coverity issue: 340859
Fixes: c7b436e ("compress/zlib: support burst enqueue/dequeue")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
  • Loading branch information
Adam Dybkowski authored and kevintraynor committed Sep 4, 2019
1 parent f61b77c commit 7dedc1b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/compress/zlib/zlib_pmd.c
Expand Up @@ -30,6 +30,7 @@ process_zlib_deflate(struct rte_comp_op *op, z_stream *strm)
default:
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
ZLIB_PMD_ERR("Invalid flush value\n");
return;
}

if (unlikely(!strm)) {
Expand Down

0 comments on commit 7dedc1b

Please sign in to comment.