From: Michal Privoznik Date: Tue, 13 Nov 2018 15:45:52 +0000 (+0100) Subject: virSecuritySELinuxTransactionCommit: Don't mask error X-Git-Tag: v4.10.0-rc1~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d8f6b4e88dbc31b7780a6d724248b14f2f5f0cb;p=thirdparty%2Flibvirt.git virSecuritySELinuxTransactionCommit: Don't mask error In 4674fc6afd6 I've implemented transactions for selinux driver. Well, now that I am working in this area I've noticed a subtle bug: @ret is initialized to 0 instead of -1. Facepalm. Signed-off-by: Michal Privoznik Reviewed-by: Marc Hartmayer --- diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 467d1e6bfe..c09404f6f8 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1091,7 +1091,7 @@ virSecuritySELinuxTransactionCommit(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED, pid_t pid) { virSecuritySELinuxContextListPtr list; - int ret = 0; + int ret = -1; list = virThreadLocalGet(&contextList); if (!list)