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

Sharad Mishra snmishra at us.ibm.com
Wed Aug 10 20:50:56 UTC 2011


# 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;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20110810/5b021b02/attachment.htm>


More information about the Libvirt-cim mailing list