From f31c8e4c6d82812ea256a589638dbd6783d99928 Mon Sep 17 00:00:00 2001 From: wiz Date: Fri, 16 Jun 2023 23:36:26 +0000 Subject: [PATCH] Fix memory leak CVS: ---------------------------------------------------------------------- CVS: CVSROOT cvs.NetBSD.org:/cvsroot CVS: please use "PR category/123" to have the commitmsg appended to PR 123 CVS: CVS: Please evaluate your changes and consider the following. CVS: Abort checkin if you answer no. CVS: => For all changes: CVS: Do the changed files compile? CVS: Has the change been tested? CVS: => If you are not completely familiar with the changed components: CVS: Has the change been posted for review? CVS: Have you allowed enough time for feedback? CVS: => If the change is major: CVS: => If the change adds files to, or removes files from $DESTDIR: CVS: => If you are changing a library or kernel interface: CVS: Have you successfully run "./build.sh release"? --- usr.bin/patch/inp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c index ab657bf98bcb..3aa50c688c04 100644 --- a/usr.bin/patch/inp.c +++ b/usr.bin/patch/inp.c @@ -1,7 +1,7 @@ /* * $OpenBSD: inp.c,v 1.34 2006/03/11 19:41:30 otto Exp $ * $DragonFly: src/usr.bin/patch/inp.c,v 1.6 2007/09/29 23:11:10 swildner Exp $ - * $NetBSD: inp.c,v 1.29 2023/06/16 23:32:37 wiz Exp $ + * $NetBSD: inp.c,v 1.30 2023/06/16 23:36:26 wiz Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: inp.c,v 1.29 2023/06/16 23:32:37 wiz Exp $"); +__RCSID("$NetBSD: inp.c,v 1.30 2023/06/16 23:36:26 wiz Exp $"); #include #include @@ -271,6 +271,7 @@ plan_a(const char *filename) } else if (statfailed) { fatal("can't find %s\n", filename); } + free(lbuf); free(tmp_filename1); free(tmp_filename2); }