Module Name: src
Committed By: wiz
Date: Fri Jun 16 23:36:26 UTC 2023
Modified Files:
src/usr.bin/patch: inp.c
Log Message:
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"?
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/patch/inp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/patch/inp.c
diff -u src/usr.bin/patch/inp.c:1.29 src/usr.bin/patch/inp.c:1.30
--- src/usr.bin/patch/inp.c:1.29 Fri Jun 16 23:32:37 2023
+++ src/usr.bin/patch/inp.c Fri Jun 16 23:36:26 2023
@@ -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 <sys/cdefs.h>
-__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 <sys/types.h>
#include <sys/file.h>
@@ -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);
}