Module Name: src
Committed By: njoly
Date: Thu Jun 18 20:36:28 UTC 2009
Modified Files:
src/sys/compat/linux/common: linux_sched.c
Log Message:
In linux_sys_sched_getaffinity(), do not leak memory on error.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/common/linux_sched.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/linux/common/linux_sched.c
diff -u src/sys/compat/linux/common/linux_sched.c:1.58 src/sys/compat/linux/common/linux_sched.c:1.59
--- src/sys/compat/linux/common/linux_sched.c:1.58 Sat Oct 25 23:38:28 2008
+++ src/sys/compat/linux/common/linux_sched.c Thu Jun 18 20:36:28 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sched.c,v 1.58 2008/10/25 23:38:28 christos Exp $ */
+/* $NetBSD: linux_sched.c,v 1.59 2009/06/18 20:36:28 njoly Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.58 2008/10/25 23:38:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.59 2009/06/18 20:36:28 njoly Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -646,12 +646,11 @@
retp = (int *)&data[SCARG(uap, len) - sizeof(ret)];
*retp = ret;
- if ((error = copyout(data, SCARG(uap, mask), SCARG(uap, len))) != 0)
- return error;
+ error = copyout(data, SCARG(uap, mask), SCARG(uap, len));
free(data, M_TEMP);
- return 0;
+ return error;
}