Module Name:    src
Committed By:   maxv
Date:           Mon Aug 15 08:24:05 UTC 2016

Modified Files:
        src/sys/arch/ia64/stand/common: load_elf64.c

Log Message:
Uninitialized var, found by brainy; not tested, but obvious enough


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/common/load_elf64.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/arch/ia64/stand/common/load_elf64.c
diff -u src/sys/arch/ia64/stand/common/load_elf64.c:1.2 src/sys/arch/ia64/stand/common/load_elf64.c:1.3
--- src/sys/arch/ia64/stand/common/load_elf64.c:1.2	Sat Apr 22 07:58:53 2006
+++ src/sys/arch/ia64/stand/common/load_elf64.c	Mon Aug 15 08:24:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: load_elf64.c,v 1.2 2006/04/22 07:58:53 cherry Exp $	*/
+/*	$NetBSD: load_elf64.c,v 1.3 2016/08/15 08:24:05 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1998 Michael Smith <msm...@freebsd.org>
@@ -75,8 +75,10 @@ elf64_loadfile(char *filename, u_int64_t
 
     marks[MARK_START] = dest;
 
-    if ((fd = loadfile(filename, marks, LOAD_KERNEL)) == -1)
+    if ((fd = loadfile(filename, marks, LOAD_KERNEL)) == -1) {
+	    err = EPERM;
 	    goto oerr;
+    }
     close(fd);
 
     dest = marks[MARK_ENTRY];

Reply via email to