changeset 838:a6cd073c5283 HEAD

Don't leak data stack memory.
author Timo Sirainen <tss@iki.fi>
date Sun, 22 Dec 2002 08:28:44 +0200
parents ec6dd72cb8e3
children 34cb1d196d2b
files src/lib/compat.c src/lib/failures.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/compat.c	Sun Dec 22 08:25:50 2002 +0200
+++ b/src/lib/compat.c	Sun Dec 22 08:28:44 2002 +0200
@@ -72,7 +72,9 @@
 #ifndef HAVE_VSYSLOG
 void my_vsyslog(int priority, const char *format, va_list args)
 {
+	t_push();
 	syslog(priority, "%s", t_strdup_vprintf(format, args));
+	t_pop();
 }
 #endif
 
--- a/src/lib/failures.c	Sun Dec 22 08:25:50 2002 +0200
+++ b/src/lib/failures.c	Sun Dec 22 08:28:44 2002 +0200
@@ -95,6 +95,7 @@
 	if (log_fd == NULL)
 		log_fd = stderr;
 
+	t_push();
 	if (recursed == 2) {
 		/* write without fixing format, that probably killed us
 		   last time. */
@@ -115,6 +116,8 @@
 
 	fputc('\n', log_fd);
 
+	t_pop();
+
 	errno = old_errno;
 	recursed--;
 }