diff options
author | joerg <joerg> | 2010-01-23 23:08:03 +0000 |
---|---|---|
committer | joerg <joerg> | 2010-01-23 23:08:03 +0000 |
commit | 3f8ceb30c3c7303781db2fa347b50d8edef1a3b8 (patch) | |
tree | a6fa8f22913a5d57583f466f73b054134da5d11b /devel | |
parent | 0c1fc2e587c937e5ca819a531d9e0dde9127f712 (diff) | |
download | pkgsrc-3f8ceb30c3c7303781db2fa347b50d8edef1a3b8.tar.gz |
nbpatch-20100124: Fix a memory leak.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/nbpatch/Makefile | 4 | ||||
-rw-r--r-- | devel/nbpatch/files/util.c | 6 |
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) |