summaryrefslogtreecommitdiff
path: root/usr.sbin/afs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-11 22:35:28 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-11 22:35:28 +0000
commitb4f1374b2439b35038ea8844d228b497dba35c65 (patch)
tree329b4654fdb86eb452d52dc56e0e03f0ed69665b /usr.sbin/afs
parent2946450200c5492bbf7d9a173b56de1d1e4422b5 (diff)
two memory leaks; spotted by parfait; ok beck
Diffstat (limited to 'usr.sbin/afs')
-rw-r--r--usr.sbin/afs/src/lwp/lwp_asm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/afs/src/lwp/lwp_asm.c b/usr.sbin/afs/src/lwp/lwp_asm.c
index 9cf778366f2..48a5cf4db51 100644
--- a/usr.sbin/afs/src/lwp/lwp_asm.c
+++ b/usr.sbin/afs/src/lwp/lwp_asm.c
@@ -465,11 +465,13 @@ LWP_CreateProcess(void (*ep)(), int stacksize, int priority,
#else /* !AFS_AIX32_ENV */
if ((stackptr = (char *) lwp_stackmalloc(stacksize)) == NULL) {
Set_LWP_RC();
+ free(temp);
return LWP_ENOMEM;
}
#endif /* AFS_AIX32_ENV */
if (priority < 0 || priority >= MAX_PRIORITIES) {
Set_LWP_RC();
+ free(temp);
return LWP_EBADPRI;
}
Initialize_Stack(stackptr, stacksize);