[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] memory error in another test



On Wed, Oct 17, 2007 at 03:45:42PM +0200, Jim Meyering wrote:
> 	Avoid memory error in a test program.
> 	* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Initialize
> 	vm.migrateFrom[0], to avoid "read-uninitialized" error
> 	from within qemudBuildCommandLine.
> 
> Index: tests/qemuxml2argvtest.c
> ===================================================================
> RCS file: /data/cvs/libvirt/tests/qemuxml2argvtest.c,v
> retrieving revision 1.5
> diff -u -p -r1.5 qemuxml2argvtest.c
> --- tests/qemuxml2argvtest.c	21 Sep 2007 21:20:32 -0000	1.5
> +++ tests/qemuxml2argvtest.c	17 Oct 2007 13:42:15 -0000
> @@ -40,6 +40,7 @@ static int testCompareXMLToArgvFiles(con
>      vm.qemuVersion = 0 * 1000 * 100 + (8 * 1000) + 1;
>      vm.qemuCmdFlags = QEMUD_CMD_FLAG_VNC_COLON |
>          QEMUD_CMD_FLAG_NO_REBOOT;
> +    vm.migrateFrom[0] = '\0';
> 
>      vmdef->vncActivePort = vmdef->vncPort;

  yes, makes sense to me,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]