[libvirt] [PATCH 1/2] virSysinfoParseX86Chassis: Store asset tag into correct pointer

Peter Krempa pkrempa at redhat.com
Tue Mar 13 14:21:43 UTC 2018


On Tue, Mar 13, 2018 at 14:37:04 +0100, Michal Privoznik wrote:
> Probably due to copy-paste error we're storing asset tag into
> def->sku which we even use in the next step to store SKU number
> and thus the asset tag leaks.
> 
> ==19200== 41 bytes in 1 blocks are definitely lost in loss record 849 of 1,059
> ==19200==    at 0x4C2AF0F: malloc (vg_replace_malloc.c:299)
> ==19200==    by 0x8785419: strndup (in /lib64/libc-2.25.so)
> ==19200==    by 0x53588D7: virStrndup (virstring.c:1023)
> ==19200==    by 0x535C6CF: virSysinfoParseX86Chassis (virsysinfo.c:882)
> ==19200==    by 0x535DA67: virSysinfoReadX86 (virsysinfo.c:1149)
> ==19200==    by 0x535DB3A: virSysinfoRead (virsysinfo.c:1206)
> ==19200==    by 0x2BE0B27E: qemuStateInitialize (qemu_driver.c:641)
> ==19200==    by 0x556AB4F: virStateInitialize (libvirt.c:770)
> ==19200==    by 0x1299B9: daemonRunStateInit (remote_daemon.c:846)
> ==19200==    by 0x5361A58: virThreadHelper (virthread.c:206)
> ==19200==    by 0x84E3896: start_thread (in /lib64/libpthread-2.25.so)
> ==19200==    by 0x87F4CFE: clone (in /lib64/libc-2.25.so)

This backtrace is not really relevant IMO, since the problem is that
we'd not parse the asset tag properly. The memory leak is only a side
effect of that bug.

ACK if you fix the commit message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180313/db1b77d9/attachment-0001.sig>


More information about the libvir-list mailing list