add missing arg test to theree api functions

Signed-off-by: Ivana Hutarova Varekova <varek...@redhat.com>
---

 0 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/src/api.c b/src/api.c
index 2905fed..53c76e8 100644
--- a/src/api.c
+++ b/src/api.c
@@ -3650,6 +3650,9 @@ int cgroup_get_subsys_mount_point(const char *controller, 
char **mount_point)
        if (!cgroup_initialized)
                return ECGROUPNOTINITIALIZED;
 
+       if (!controller)
+               return ECGINVAL;
+
        pthread_rwlock_rdlock(&cg_mount_table_lock);
        for (i = 0; cg_mount_table[i].name[0] != '\0'; i++) {
                if (strncmp(cg_mount_table[i].name, controller, FILENAME_MAX))
@@ -3913,6 +3916,10 @@ int cgroup_dictionary_iterator_next(void **handle,
                return ECGINVAL;
 
        iter = *handle;
+
+       if (!iter)
+               return ECGINVAL;
+
        if (!iter->item)
                return ECGEOF;
 


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to