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"?
This commit is contained in:
wiz 2023-06-16 23:36:26 +00:00
parent 0fb1b87aad
commit f31c8e4c6d
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}