Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scst_lib: Fix memory leak reported by Coverity
This patch fixes the following Coverity complaint: CID 275306 (#1 of 1): Resource leak (RESOURCE_LEAK) Variable cwrp going out of scope leaks the storage it points to. In the scst_cmp_wr_local() function, we don't free 'cwrp' if the next check after the memory allocation fails. Hence move this check before allocating memory. Fixes: 4525b04 ("scst: Reject inconsistent COMPARE AND WRITE commands")
- Loading branch information