[Libvirt-cim] [PATCH] Check to see if stream is non-null before closing

Wayne Xia xiawenc at linux.vnet.ibm.com
Thu Aug 11 08:48:18 UTC 2011


+1
于 2011-8-11 4:50, Sharad Mishra 写道:
> # HG changeset patch
> # User Sharad Mishra <snmishra at us.ibm.com>
> # Date 1312828809 25200
> # Node ID 8b4f6d69f40904ced24f7948f04f89e770e37bce
> # Parent dd060dd8dbbd6c1d9a73de4dffa9fb2ab84d62b9
> Check to see if stream is non-null before closing.
>
> Added a check to see if the stream is non-null before
> calling close.
>
> Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>
>
> diff -r dd060dd8dbbd -r 8b4f6d69f409 src/Virt_SwitchService.c
> --- a/src/Virt_SwitchService.c Thu Aug 04 11:22:32 2011 -0400
> +++ b/src/Virt_SwitchService.c Mon Aug 08 11:40:09 2011 -0700
> @@ -91,7 +91,8 @@
> "No VSI Support found");
>
> out:
> - pclose(stream);
> + if (stream != NULL)
> + pclose(stream);
> return s;
> }
>
>
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim


-- 
Best Regards

Wayne Xia
mail:xiawenc at linux.vnet.ibm.com
tel:86-010-82450803




More information about the Libvirt-cim mailing list