mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-23 20:55:22 +00:00
tpm2: Fix memory leaks in TPM2_GetInfo()
This patch fixes two memory leaks in the new code in TPM2_GetInfo(). Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
e97909d845
commit
b7b670c787
@ -413,6 +413,8 @@ char *TPM2_GetInfo(enum TPMLIB_InfoFlags flags)
|
||||
if (asprintf(&buffer, fmt, printed ? "," : "",
|
||||
tpmfeatures, "%s%s%s") < 0)
|
||||
goto error;
|
||||
free(fmt);
|
||||
free(tpmfeatures);
|
||||
printed = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user