Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/ultrix Fix uninitialized pointer, found by Mootja...
details: https://anonhg.NetBSD.org/src/rev/d14fc3d07c2d
branches: trunk
changeset: 357920:d14fc3d07c2d
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Dec 03 12:53:52 2017 +0000
description:
Fix uninitialized pointer, found by Mootja. Not a surprise in untested
code.
diffstat:
sys/compat/ultrix/ultrix_fs.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 8ae23f2b99cd -r d14fc3d07c2d sys/compat/ultrix/ultrix_fs.c
--- a/sys/compat/ultrix/ultrix_fs.c Sun Dec 03 11:49:32 2017 +0000
+++ b/sys/compat/ultrix/ultrix_fs.c Sun Dec 03 12:53:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ultrix_fs.c,v 1.57 2017/04/13 09:18:18 hannken Exp $ */
+/* $NetBSD: ultrix_fs.c,v 1.58 2017/12/03 12:53:52 maxv Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.57 2017/04/13 09:18:18 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.58 2017/12/03 12:53:52 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -276,7 +276,7 @@
make_ultrix_mntent(sp, &tem);
if ((error = copyout((void *)&tem, sfsp,
sizeof(tem))) != 0) {
- goto bad;
+ goto bad_freeiter;
}
sfsp++;
count++;
@@ -289,8 +289,9 @@
else
*retval = count;
+bad_freeiter:
+ mountlist_iterator_destroy(iter);
bad:
- mountlist_iterator_destroy(iter);
if (path)
free(path, M_TEMP);
return error;
Home |
Main Index |
Thread Index |
Old Index