summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/umberlog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/umberlog.c b/lib/umberlog.c
index fe0a6b7..84bd64b 100644
--- a/lib/umberlog.c
+++ b/lib/umberlog.c
@@ -51,6 +51,7 @@ static void (*old_openlog) ();
static int (*old_setlogmask) ();
static void ul_init (void) __attribute__((constructor));
+static void ul_finish (void) __attribute__((destructor));
static __thread struct
{
@@ -77,6 +78,12 @@ ul_init (void)
old_setlogmask = dlsym (RTLD_NEXT, "setlogmask");
}
+static void
+ul_finish (void)
+{
+ free (ul_buffer.msg);
+}
+
void
ul_openlog (const char *ident, int option, int facility)
{