Re: [libvirt-php 2/2] Fix possible uninitialized variable

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

 



On 04/14/2011 10:50 AM, Lyre wrote:
> ---
>  src/libvirt-php.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/libvirt-php.c b/src/libvirt-php.c
> index 020da4e..d436e1c 100644
> --- a/src/libvirt-php.c
> +++ b/src/libvirt-php.c
> @@ -1204,7 +1204,8 @@ char *get_string_from_xpath(char *xml, char *xpath, zval **val, int *retVal)
>  	xmlXPathObjectPtr result;
>  	xmlNodeSetPtr nodeset;
>  	int ret = 0, i;
> -	char *value, key[8] = { 0 };
> +	char *value = NULL; 
> +	char key[8] = { 0 };
>  
>  	if ((xpath == NULL) || (xml == NULL))
>  	{
Good change. Thanks and pushed.

Michal

-- 
Michal Novotny <minovotn@xxxxxxxxxx>, RHCE
Virtualization Team (xen userspace), Red Hat

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]