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

Re: [libvirt] Segfault fixed



On 30.01.2012 11:46, Hendrik Schwartke wrote:
> Hi,
> 
> there is a segfault in qemu_monitor_text.c. If some error accurs in
> qemuMonitorTextGetBlockInfo then the cleanup code calls VIR_FREE(info)
> without ensuring that info is initialized.
> 
> Patch based on c6ec021b3c19c3ecc97d60d35b12eaa0b94da701:
> 
> diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
> index a33d192..fb3309b 100644
> --- a/src/qemu/qemu_monitor_text.c
> +++ b/src/qemu/qemu_monitor_text.c
> @@ -774,7 +774,7 @@ int qemuMonitorTextGetMemoryStats(qemuMonitorPtr mon,
>  int qemuMonitorTextGetBlockInfo(qemuMonitorPtr mon,
>                                  virHashTablePtr table)
>  {
> -    struct qemuDomainDiskInfo *info;
> +    struct qemuDomainDiskInfo *info=NULL;
>      char *reply = NULL;
>      int ret = -1;
>      char *dummy;
> 


Hi,

thank you for catching that. I've went ahead and pushed this and added
you to AUTHORS as well. Let me know if you prefer any other spelling.

Michal


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