summaryrefslogtreecommitdiff
path: root/devel/nbpatch
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2010-01-23 23:08:03 +0000
committerjoerg <joerg@pkgsrc.org>2010-01-23 23:08:03 +0000
commitb9ba5646b71b77592799a69517be685d4ba82234 (patch)
treea6fa8f22913a5d57583f466f73b054134da5d11b /devel/nbpatch
parent06d091125da4a5c4ce54e8d489643c9f08b9ec35 (diff)
downloadpkgsrc-b9ba5646b71b77592799a69517be685d4ba82234.tar.gz
nbpatch-20100124: Fix a memory leak.
Diffstat (limited to 'devel/nbpatch')
-rw-r--r--devel/nbpatch/Makefile4
-rw-r--r--devel/nbpatch/files/util.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/devel/nbpatch/Makefile b/devel/nbpatch/Makefile
index d92dfb6c273..cb7a8576a4b 100644
--- a/devel/nbpatch/Makefile
+++ b/devel/nbpatch/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2009/10/21 17:17:04 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2010/01/23 23:08:03 joerg Exp $
#
-DISTNAME= nbpatch-20091021
+DISTNAME= nbpatch-20100124
CATEGORIES= devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/devel/nbpatch/files/util.c b/devel/nbpatch/files/util.c
index f0373f2c530..4d63d28b75a 100644
--- a/devel/nbpatch/files/util.c
+++ b/devel/nbpatch/files/util.c
@@ -1,7 +1,7 @@
/*
* $OpenBSD: util.c,v 1.32 2006/03/11 19:41:30 otto Exp $
* $DragonFly: src/usr.bin/patch/util.c,v 1.9 2007/09/29 23:11:10 swildner Exp $
- * $NetBSD: util.c,v 1.3 2009/05/09 20:09:33 joerg Exp $
+ * $NetBSD: util.c,v 1.4 2010/01/23 23:08:03 joerg Exp $
*/
/*
@@ -327,8 +327,10 @@ makedirs(const char *filename, bool striplast)
if (striplast) {
char *s = strrchr(tmpbuf, '/');
- if (s == NULL)
+ if (s == NULL) {
+ free(tmpbuf);
return; /* nothing to be done */
+ }
*s = '\0';
}
if (mkpath(tmpbuf) != 0)