[libgovirt] Add sanity check for ovirt_proxy_get_vms input parameter



commit 0b8af79f36063eda74d051bc42719b4564c0ca7c
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Thu Aug 22 15:10:35 2013 +0200

    Add sanity check for ovirt_proxy_get_vms input parameter

 govirt/ovirt-proxy.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/govirt/ovirt-proxy.c b/govirt/ovirt-proxy.c
index 6f5dc4b..f4d660c 100644
--- a/govirt/ovirt-proxy.c
+++ b/govirt/ovirt-proxy.c
@@ -764,6 +764,8 @@ OvirtProxy *ovirt_proxy_new(const char *uri)
  */
 GList *ovirt_proxy_get_vms(OvirtProxy *proxy)
 {
+    g_return_val_if_fail(OVIRT_IS_PROXY(proxy), NULL);
+
     if (proxy->priv->vms != NULL) {
         return g_hash_table_get_values(proxy->priv->vms);
     }


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