[PATCH] qemu: tpm: Initialize variable with NULL

Ján Tomko jtomko at redhat.com
Mon Nov 8 14:40:17 UTC 2021


On a Monday in 2021, Marc-André Lureau wrote:
>On Mon, Nov 8, 2021 at 5:53 PM Stefan Berger <stefanb at linux.ibm.com> wrote:
>>
>> Initialize an autofree'd variable with NULL that causes crashes
>> if a TPM 1.2 is used and the variable doesn't get a value assigned.
>>
>> Signed-off-by: Stefan Berger <stefanb at linux.ibm.com>
>
>certainly, I wished there would be a gcc error there..
>

There was
https://gitlab.com/libvirt/libvirt/-/pipelines/402739013/failures

And this was already patched by Peter:
commit c43f22d5c1ea08c5516d791010ed3c230c47cb53
     qemuTPMEmulatorReconfigure: Fix two build issues

Jano

>Reviewed-by: Marc-André Lureau <marcandre.lureau at redhat.com>
>
>> ---
>>  src/qemu/qemu_tpm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211108/146336bf/attachment-0001.sig>


More information about the libvir-list mailing list