Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/usr.sbin/sysinst Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/2b2732480bc9
branches: netbsd-9
changeset: 462379:2b2732480bc9
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sun Aug 18 13:29:15 2019 +0000
description:
Pull up following revision(s) (requested by martin in ticket #83):
usr.sbin/sysinst/util.c: revision 1.31
usr.sbin/sysinst/install.c: revision 1.10
usr.sbin/sysinst/install.c: revision 1.11
Fix some memory leaks in error paths
Oops, avoid double free.
diffstat:
usr.sbin/sysinst/install.c | 19 ++++++++++---------
usr.sbin/sysinst/util.c | 3 ++-
2 files changed, 12 insertions(+), 10 deletions(-)
diffs (79 lines):
diff -r 638017df11dc -r 2b2732480bc9 usr.sbin/sysinst/install.c
--- a/usr.sbin/sysinst/install.c Sun Aug 18 13:25:21 2019 +0000
+++ b/usr.sbin/sysinst/install.c Sun Aug 18 13:29:15 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: install.c,v 1.9 2019/07/23 18:13:40 martin Exp $ */
+/* $NetBSD: install.c,v 1.9.2.1 2019/08/18 13:29:15 msaitoh Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -165,7 +165,7 @@
if (!md_get_info(&install) ||
!md_make_bsd_partitions(&install)) {
hit_enter_to_continue(MSG_abort_inst, NULL);
- return;
+ goto error;
}
/* Last chance ... do you really want to do this? */
@@ -173,7 +173,7 @@
refresh();
msg_fmt_display(MSG_lastchance, "%s", pm->diskdev);
if (!ask_noyes(NULL))
- return;
+ goto error;
/*
* Check if we have a secondary partitioning and
@@ -194,19 +194,19 @@
make_filesystems(&install) ||
make_fstab(&install) != 0 ||
md_post_newfs(&install) != 0)
- return;
+ goto error;
}
/* Unpack the distribution. */
process_menu(MENU_distset, &retcode);
if (retcode == 0)
- return;
+ goto error;
if (get_and_unpack_sets(0, MSG_disksetupdone,
MSG_extractcomplete, MSG_abortinst) != 0)
- return;
+ goto error;
if (md_post_extract(&install) != 0)
- return;
+ goto error;
do_configmenu(&install);
@@ -214,7 +214,8 @@
md_cleanup_install(&install);
- free(install.infos);
+ hit_enter_to_continue(MSG_instcomplete, NULL);
- hit_enter_to_continue(MSG_instcomplete, NULL);
+error:
+ free(install.infos);
}
diff -r 638017df11dc -r 2b2732480bc9 usr.sbin/sysinst/util.c
--- a/usr.sbin/sysinst/util.c Sun Aug 18 13:25:21 2019 +0000
+++ b/usr.sbin/sysinst/util.c Sun Aug 18 13:29:15 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.29.2.1 2019/08/18 13:25:21 msaitoh Exp $ */
+/* $NetBSD: util.c,v 1.29.2.2 2019/08/18 13:29:15 msaitoh Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -933,6 +933,7 @@
1, &dist->name);
hit_enter_to_continue(err, NULL);
free(err);
+ free(owd);
return SET_RETRY;
}
#ifdef SUPPORT_8_3_SOURCE_FILESYSTEM
Home |
Main Index |
Thread Index |
Old Index