[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH hurd] rumpdisk: Deallocate buffers in write during failure paths
From: |
Damien Zammit |
Subject: |
[PATCH hurd] rumpdisk: Deallocate buffers in write during failure paths |
Date: |
Sat, 28 Dec 2024 06:38:41 +0000 |
---
rumpdisk/block-rump.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c
index cd7af494..8a3a404a 100644
--- a/rumpdisk/block-rump.c
+++ b/rumpdisk/block-rump.c
@@ -373,6 +373,7 @@ rumpdisk_device_write (void *d, mach_port_t reply_port,
if (written < 0)
{
+ vm_deallocate (mach_task_self (), (vm_address_t) data, count);
pthread_rwlock_unlock (&rumpdisk_rwlock);
return rump_errno2host (err);
}
@@ -402,6 +403,7 @@ rumpdisk_device_write (void *d, mach_port_t reply_port,
if (done < 0)
{
+ vm_deallocate (mach_task_self (), (vm_address_t) data, count);
pthread_rwlock_unlock (&rumpdisk_rwlock);
return rump_errno2host (errno);
}
--
2.45.2
- [PATCH hurd] rumpdisk: Deallocate buffers in write during failure paths,
Damien Zammit <=