mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 07:24:37 +00:00
Fix memory leak in linux_openat function
This commit is contained in:
parent
08c4bcc4a3
commit
f0896a0b75
@ -2478,7 +2478,9 @@ static int linux_openat(SysFrm *, int dirfd, const char *pathname, int flags, mo
|
||||
const char *absPath = new char[strlen(absoluteNode->node->FullPath) + 1];
|
||||
strcpy((char *)absPath, absoluteNode->node->FullPath);
|
||||
delete absoluteNode;
|
||||
return fdt->_open(absPath, flags, mode);
|
||||
int ret = fdt->_open(absPath, flags, mode);
|
||||
delete[] absPath;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!fs->PathIsRelative(pPathname))
|
||||
|
Loading…
x
Reference in New Issue
Block a user