# HG changeset patch
# User john.le...@sun.com
# Date 1232478815 28800
# Node ID 37a6a671e38d7f4449d3b47bc5cf06c19362bc41
# Parent  15bfba92a98744f8c554757ed608c3bf89fa38aa
Fix openlog() ident usage

It cannot be freed, as it's used by reference in the syslog code, at
least on Solaris.

Signed-off-by: John Levon <john.le...@sun.com>

diff --git a/src/logging.c b/src/logging.c
--- a/src/logging.c
+++ b/src/logging.c
@@ -705,7 +705,10 @@ int virLogParseOutputs(const char *outpu
                 return(-1);
             if (virLogAddOutputToSyslog(prio, name) == 0)
                 ret++;
-            VIR_FREE(name);
+            /*
+             * Do *NOT* free(name) - openlog() uses this string by
+             * reference, instead of keeping its own copy.
+            */
 #endif /* HAVE_SYSLOG_H */
         } else if (STREQLEN(cur, "file", 4)) {
             cur += 4;

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

Reply via email to