git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UDI/include - Fix typedefs in GIO metalang
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
vfs
/
handle.c
diff --git
a/KernelLand/Kernel/vfs/handle.c
b/KernelLand/Kernel/vfs/handle.c
index
db79933
..
cd4997d
100644
(file)
--- a/
KernelLand/Kernel/vfs/handle.c
+++ b/
KernelLand/Kernel/vfs/handle.c
@@
-248,10
+248,13
@@
void VFS_RestoreHandles(int NumFDs, void *Handles)
if( !MM_GetPhysAddr(h) )
{
if( !MM_GetPhysAddr(h) )
{
- if( !MM_Allocate( (tVAddr)h & ~(PAGE_SIZE-1) ) )
+ void *pg = (void*)( (tVAddr)h & ~(PAGE_SIZE-1) );
+ if( !MM_Allocate( (tVAddr)pg ) )
{
// OOM?
{
// OOM?
+ return ;
}
}
+ memset(pg, 0, PAGE_SIZE);
}
// Safe to dereference, as Threads_CloneTCB references handles
#if 1
}
// Safe to dereference, as Threads_CloneTCB references handles
#if 1
UCC
git Repository :: git.ucc.asn.au