From 9e41a59ce5c64b39e9f37ee33bfcd3e1b6ecd747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 18 May 2022 15:58:06 +0200 Subject: [PATCH] apparmor: report error when removing profile failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assign the return value to 'rc' before comparing it. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- src/security/virt-aa-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index b314d2a059..107f217246 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1497,7 +1497,7 @@ main(int argc, char **argv) size = virFileLength(profile, -1); if (size == 0) { vah_warning(_("Profile of 0 size detected, will attempt to remove it")); - if ((rc = parserRemove(ctl->uuid) != 0)) + if ((rc = parserRemove(ctl->uuid)) != 0) vah_error(ctl, 1, _("could not remove profile")); unlink(profile); purged = true;