[libvirt] [PATCH]: (trivial) getpwuid is not OOM

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

 



Hi,
we shouldn't print an oom error message when actually getpwuid failed.
Cheers,
 -- Guido
[PATCH] don't report OOM when it's not

---
 src/qemu_driver.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index b5ba723..806608d 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -201,7 +201,7 @@ qemudStartup(void) {
         if (!(pw = getpwuid(uid))) {
             qemudLog(QEMUD_ERR, _("Failed to find user record for uid '%d': %s\n"),
                      uid, strerror(errno));
-            goto out_of_memory;
+            goto out_nouid;
         }
 
         if (asprintf(&qemu_driver->logDir,
@@ -264,6 +264,7 @@ qemudStartup(void) {
  out_of_memory:
     qemudLog (QEMUD_ERR,
               "%s", _("qemudStartup: out of memory\n"));
+ out_nouid:
     VIR_FREE(base);
     VIR_FREE(qemu_driver);
     return -1;
-- 
1.5.6.5

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]