]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Fix error reporting in virProcessSetMaxMemLock
authorJiri Denemark <jdenemar@redhat.com>
Fri, 10 Jun 2022 16:05:16 +0000 (18:05 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 10 Jun 2022 16:38:25 +0000 (18:38 +0200)
Commit v7.1.0-136-g6a6d6bb520 refactored virProcessSetMaxMemLock by
moving its part into a new virProcessSetLimit, but lost "return -1" on
error.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virprocess.c

index 5ed0b5d0db80fda07af28060f5984873730de5ad..013afd91b4cb8d3b683943ce6d2753b1217ae295 100644 (file)
@@ -926,6 +926,7 @@ virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes)
                              _("cannot limit locked memory "
                                "of process %lld to %llu"),
                              (long long int)pid, bytes);
+        return -1;
     }
 
     VIR_DEBUG("Locked memory for process %lld limited to %llu bytes",