From: Dr. David Alan Gilbert Date: Mon, 3 Feb 2020 12:25:56 +0000 (+0000) Subject: virtiofsd: load_capng missing unlock X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=686391112fd42c615bcc4233472887a66a9b5a4a;p=qemu.git virtiofsd: load_capng missing unlock Missing unlock in error path. Fixes: Covertiy CID 1413123 Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi --- diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index e6f2399efc..c635fc8820 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools/virtiofsd/passthrough_ll.c @@ -232,6 +232,7 @@ static int load_capng(void) */ cap.saved = capng_save_state(); if (!cap.saved) { + pthread_mutex_unlock(&cap.mutex); fuse_log(FUSE_LOG_ERR, "capng_save_state (thread)\n"); return -EINVAL; }