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

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



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


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