diff --git a/ipath/ipath_debug.c b/ipath/ipath_debug.c index b89502f..61cb433 100644 --- a/ipath/ipath_debug.c +++ b/ipath/ipath_debug.c @@ -52,6 +52,7 @@ FILE *__ipath_dbgout; static void init_ipath_mylabel(void) __attribute__ ((constructor)); static void init_ipath_backtrace(void) __attribute__ ((constructor)); static void init_ipath_dbgfile(void) __attribute__ ((constructor)); +static void fini_ipath_mylabel(void) __attribute__ ((destructor)); static void fini_ipath_backtrace(void) __attribute__ ((destructor)); static void init_ipath_mylabel(void) @@ -80,6 +81,12 @@ static void init_ipath_mylabel(void) __ipath_mylabel = strdup(lbl); } +static void fini_ipath_mylabel(void) +{ + if (NULL != __ipath_mylabel) + free(__ipath_mylabel); +} + static void ipath_sighdlr(int sig, siginfo_t *p1, void *ucv) {