From: Peter Krempa <pkre...@redhat.com>

The 'virGet*' helpers check that the passed objects which are used to
construct the new object are valid. The check that the 'conn' object in
'virStreamGet' was missing.

Signed-off-by: Peter Krempa <pkre...@redhat.com>
---
 src/datatypes.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/datatypes.c b/src/datatypes.c
index c83a74edd5..4e72855ebc 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -798,6 +798,8 @@ virGetStream(virConnectPtr conn)
     if (virDataTypesInitialize() < 0)
         return NULL;

+    virCheckConnectReturn(conn, NULL);
+
     if (!(ret = virObjectNew(virStreamClass)))
         return NULL;

-- 
2.51.0

Reply via email to