From: Ján Tomko Date: Wed, 18 May 2022 13:58:06 +0000 (+0200) Subject: apparmor: report error when removing profile failed X-Git-Tag: v8.4.0-rc1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e41a59ce5c64b39e9f37ee33bfcd3e1b6ecd747;p=thirdparty%2Flibvirt.git apparmor: report error when removing profile failed Assign the return value to 'rc' before comparing it. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- 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;