[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[libvirt] [PATCH] Fix openlog() ident usage
- From: john levon sun com
- To: libvir-list redhat com
- Subject: [libvirt] [PATCH] Fix openlog() ident usage
- Date: Tue, 20 Jan 2009 11:14:03 -0800
# HG changeset patch
# User john levon 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 levon 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;
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]