[REISERFS] Don't leak on failure
authorPierre Schweitzer <pierre@reactos.org>
Sun, 22 Oct 2017 20:51:02 +0000 (22:51 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 22 Oct 2017 20:51:02 +0000 (22:51 +0200)
CID 1363597

drivers/filesystems/reiserfs/src/blockio.c

index 4762ab6..befe413 100644 (file)
@@ -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;
             }