[libvirt] [PATCH] vshInit: Don't leak @histsize_env

Ján Tomko jtomko at redhat.com
Thu Sep 3 13:13:42 UTC 2015


On Thu, Sep 03, 2015 at 02:45:35PM +0200, Michal Privoznik wrote:
> Caller is responsible for freeing the result of virStringJoin()
> when no longer needed:
> 
> ==10701== 1 bytes in 1 blocks are definitely lost in loss record 1 of 806
> ==10701==    at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==10701==    by 0xAADB679: strdup (in /lib64/libc-2.20.so)
> ==10701==    by 0x4F18655: virStrdup (virstring.c:726)
> ==10701==    by 0x4F175AF: virStringJoin (virstring.c:165)
> ==10701==    by 0x131D4D: vshReadlineInit (vsh.c:2572)
> ==10701==    by 0x1322DF: vshInit (vsh.c:2736)
> ==10701==    by 0x1347C1: main (virsh.c:907)
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  tools/vsh.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

ACK, please backport it to v1.2.19-maint too.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150903/fb07d08a/attachment-0001.sig>


More information about the libvir-list mailing list