aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authortim2019-04-29 19:03:20 +0000
committertim2019-04-29 19:03:20 +0000
commit07bf754cedc8cfd6a0ebe44de9575fe9cedeea95 (patch)
tree67db05a24cb00ee21f123996401335d0bc283943 /util.c
parentf0808f6663bbb2900d20cbae70dee0df43559745 (diff)
downloadcwm-07bf754cedc8cfd6a0ebe44de9575fe9cedeea95.tar.gz
Plug a memory leak in log_debug(); OK okan@
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index 624fc13..609f51a 100644
--- a/util.c
+++ b/util.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: util.c,v 1.23 2019/02/13 15:43:24 okan Exp $
+ * $OpenBSD: util.c,v 1.24 2019/04/29 19:03:20 tim Exp $
*/
#include <sys/types.h>
@@ -135,5 +135,6 @@ log_debug(int level, const char *func, const char *msg, ...)
va_start(ap, msg);
xasprintf(&fmt, "debug%d: %s: %s", level, func, msg);
log_msg(fmt, ap);
+ free(fmt);
va_end(ap);
}