Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makemandb PR/51040: Abhinav Upadhyay: Fix memory leak
details: https://anonhg.NetBSD.org/src/rev/0a300481b7cc
branches: trunk
changeset: 344727:0a300481b7cc
user: christos <christos%NetBSD.org@localhost>
date: Wed Apr 13 01:41:18 2016 +0000
description:
PR/51040: Abhinav Upadhyay: Fix memory leak
diffstat:
usr.sbin/makemandb/makemandb.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r b386b3701b7e -r 0a300481b7cc usr.sbin/makemandb/makemandb.c
--- a/usr.sbin/makemandb/makemandb.c Wed Apr 13 01:40:09 2016 +0000
+++ b/usr.sbin/makemandb/makemandb.c Wed Apr 13 01:41:18 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: makemandb.c,v 1.35 2016/04/13 01:40:09 christos Exp $ */
+/* $NetBSD: makemandb.c,v 1.36 2016/04/13 01:41:18 christos Exp $ */
/*
* Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost>
* Copyright (c) 2011 Kristaps Dzonsons <kristaps%bsd.lv@localhost>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.35 2016/04/13 01:40:09 christos Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.36 2016/04/13 01:41:18 christos Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -703,7 +703,7 @@
for (;;) {
r = archive_read_data(a, buf + off, *len - off);
if (r == ARCHIVE_OK) {
- archive_read_close(a);
+ archive_read_finish(a);
*bufp = buf;
*len = off;
return 0;
@@ -719,7 +719,7 @@
if (mflags.verbosity)
warnx("File too large: %s", file);
free(buf);
- archive_read_close(a);
+ archive_read_finish(a);
return -1;
}
buf = erealloc(buf, *len);
@@ -728,7 +728,7 @@
archive_error:
warnx("Error while reading `%s': %s", file, archive_error_string(a));
- archive_read_close(a);
+ archive_read_finish(a);
return -1;
}
Home |
Main Index |
Thread Index |
Old Index