security: Fix comparison for virSecuritySELinuxRecallLabel

The @con type security_context_t is actually a "char *", so the
correct check should be to dereference one more level; otherwise,
we could return/use the NULL pointer later in a subsequent
virSecuritySELinuxSetFileconImpl call (using @fcon).

Suggested-by: Michal Prívozník <mprivozn@redhat.com>
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
John Ferlan 2018-12-20 16:30:24 -05:00
parent 458b952bee
commit 9d42d51eef
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ virSecuritySELinuxRecallLabel(const char *path,
path, con) < 0)
return -1;
if (!con)
if (!*con)
return 1;
return 0;