https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5c5d20e50cd10a5386e9e…
commit 5c5d20e50cd10a5386e9e7999d88f5b50a0d7274
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Oct 22 22:51:02 2017 +0200
[REISERFS] Don't leak on failure
CID 1363597
---
drivers/filesystems/reiserfs/src/blockio.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/filesystems/reiserfs/src/blockio.c
b/drivers/filesystems/reiserfs/src/blockio.c
index 4762ab62c4..befe4136a5 100644
--- a/drivers/filesystems/reiserfs/src/blockio.c
+++ b/drivers/filesystems/reiserfs/src/blockio.c
@@ -246,6 +246,10 @@ RfsdReadWriteBlocks(
if (!Irp) {
Status = STATUS_INSUFFICIENT_RESOURCES;
+#ifdef __REACTOS__
+ ExFreePool(pContext);
+ pContext = NULL;
+#endif
_SEH2_LEAVE;
}
@@ -258,6 +262,10 @@ RfsdReadWriteBlocks(
if (!Mdl) {
Status = STATUS_INSUFFICIENT_RESOURCES;
+#ifdef __REACTOS__
+ ExFreePool(pContext);
+ pContext = NULL;
+#endif
_SEH2_LEAVE;
}