aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2020-02-03 12:25:56 +0000
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-02-10 17:24:43 +0000
commit686391112fd42c615bcc4233472887a66a9b5a4a (patch)
tree32b8b48c82353885ad399caea98b9b2a977a8120
parent6fa249027f97e3080f3d9c0fab3f94f8f80828fe (diff)
downloadqemu-686391112fd42c615bcc4233472887a66a9b5a4a.zip
qemu-686391112fd42c615bcc4233472887a66a9b5a4a.tar.gz
qemu-686391112fd42c615bcc4233472887a66a9b5a4a.tar.bz2
virtiofsd: load_capng missing unlock
Missing unlock in error path. Fixes: Covertiy CID 1413123 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--tools/virtiofsd/passthrough_ll.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index e6f2399..c635fc8 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;
}