vhost: Stop memory leak in external foreach loop
This is in response to a Scan-build issue reported on Clang 6. Change-Id: I2edc853145762998db818cbbe0e9ca0d9b8c123d Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/424139 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
17e9d38c5b
commit
bfcb7f64c1
@ -961,6 +961,7 @@ spdk_vhost_event_async_send(struct spdk_vhost_dev *vdev, spdk_vhost_event_fn cb_
|
||||
ev_ctx = calloc(1, sizeof(*ev_ctx));
|
||||
if (ev_ctx == NULL) {
|
||||
SPDK_ERRLOG("Failed to alloc vhost event.\n");
|
||||
assert(false);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user