mirror of
https://github.com/winfsp/winfsp.git
synced 2026-10-09 01:06:34 -05:00
memfs: fix erroneous realloc
This commit is contained in:
1 parent
4f5e00474e
commit
599430e649
1 file changed
+1
-1
+1
-1
@@ -634,7 +634,7 @@ static NTSTATUS SetAllocationSize(FSP_FILE_SYSTEM *FileSystem,
|
||||
return STATUS_DISK_FULL;
|
||||
|
||||
FileData = realloc(FileNode->FileData, (size_t)AllocationSize);
|
||||
if (0 == FileData)
|
||||
if (0 == FileData && 0 != AllocationSize)
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
FileNode->FileData = FileData;
|
||||
|
||||
Reference in new issue
Block a user