Module Name:    src
Committed By:   maxv
Date:           Sun Dec  3 12:53:52 UTC 2017

Modified Files:
        src/sys/compat/ultrix: ultrix_fs.c

Log Message:
Fix uninitialized pointer, found by Mootja. Not a surprise in untested
code.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/compat/ultrix/ultrix_fs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/ultrix/ultrix_fs.c
diff -u src/sys/compat/ultrix/ultrix_fs.c:1.57 src/sys/compat/ultrix/ultrix_fs.c:1.58
--- src/sys/compat/ultrix/ultrix_fs.c:1.57	Thu Apr 13 09:18:18 2017
+++ src/sys/compat/ultrix/ultrix_fs.c	Sun Dec  3 12:53:52 2017
@@ -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 @@ ultrix_sys_getmnt(struct lwp *l, const s
 				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 @@ ultrix_sys_getmnt(struct lwp *l, const s
 	else
 		*retval = count;
 
-bad:
+bad_freeiter:
 	mountlist_iterator_destroy(iter);
+bad:
 	if (path)
 		free(path, M_TEMP);
 	return error;

Reply via email to