[BTRFS] Fix IRP leak.
authorThomas Faber <thomas.faber@reactos.org>
Sun, 16 Sep 2018 13:25:27 +0000 (15:25 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 30 Sep 2018 14:11:42 +0000 (16:11 +0200)
This leaked at least one IRP for every write, making it the largest leak when
running with BTRFS as the system volume.
Thanks to Victor Perevertkin.

Submitted upstream thanks to Pierre:
https://github.com/maharmstone/btrfs/pull/106

drivers/filesystems/btrfs/write.c

index 7ede09e..6292d7e 100644 (file)
@@ -2333,6 +2333,10 @@ void free_write_data_stripes(write_data_context* wtc) {
 
         last_mdl = stripe->mdl;
 
+#ifdef __REACTOS__
+        if (stripe->Irp)
+            IoFreeIrp(stripe->Irp);
+#endif
         le = le->Flink;
     }