From 599430e649cda76de1af2e57db784bfd2b6ced4d Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 20 May 2016 18:17:00 -0700 Subject: [PATCH] memfs: fix erroneous realloc --- tst/memfs/memfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tst/memfs/memfs.cpp b/tst/memfs/memfs.cpp index 12d120c7..c43043f2 100644 --- a/tst/memfs/memfs.cpp +++ b/tst/memfs/memfs.cpp @@ -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;