diff options
author | tim | 2019-04-29 19:03:20 +0000 |
---|---|---|
committer | tim | 2019-04-29 19:03:20 +0000 |
commit | 07bf754cedc8cfd6a0ebe44de9575fe9cedeea95 (patch) | |
tree | 67db05a24cb00ee21f123996401335d0bc283943 | |
parent | f0808f6663bbb2900d20cbae70dee0df43559745 (diff) | |
download | cwm-07bf754cedc8cfd6a0ebe44de9575fe9cedeea95.tar.gz |
Plug a memory leak in log_debug(); OK okan@
Diffstat (limited to '')
-rw-r--r-- | util.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |