Code

processes plugin: Call kvm_close() after kvm_geterr().
authorFlorian Forster <octo@huhu.verplant.org>
Tue, 8 Mar 2011 08:36:13 +0000 (09:36 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 8 Mar 2011 08:36:13 +0000 (09:36 +0100)
src/processes.c

index 856296cc896ab6c4f66e5d67559ab2833b0efe86..99af276a6f48eb0044dff82db80b8e55cd533a90 100644 (file)
@@ -1492,9 +1492,9 @@ static int ps_read (void)
        procs = kvm_getprocs(kd, KERN_PROC_ALL, 0, &count);
        if (procs == NULL)
        {
-               kvm_close (kd);
                ERROR ("processes plugin: Cannot get kvm processes list: %s",
                                kvm_geterr(kd));
+               kvm_close (kd);
                return (0);
        }