mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-27 14:22:31 +02:00
Change condition to free(pub)
Change the condition under which pub is freed to make it clearer for the reader and analyzer. This change gets rid of the following gcc -fanalyzer warning: evmctl.c:1140:12: warning: leak of ‘pub’ [CWE-401] [-Wanalyzer-malloc-leak] 1140 | if (imaevm_params.x509) | ^ Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
c7928795cd
commit
066685d162
@ -1140,7 +1140,7 @@ static int cmd_import(struct command *cmd)
|
||||
log_info("keyid: %d\n", id);
|
||||
printf("%d\n", id);
|
||||
}
|
||||
if (imaevm_params.x509)
|
||||
if (pub != _pub)
|
||||
free(pub);
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user