summaryrefslogtreecommitdiff
path: root/eth-multiplexer
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-08-22 16:24:40 +0200
committerJustus Winter <justus@gnupg.org>2017-08-22 19:43:02 +0200
commit9ac9732e27128927d0e24d44d72145be5acfcc28 (patch)
tree58048cd329e2ac3feea3a434fb4818ded000eff8 /eth-multiplexer
parent9a4ccfcd4d4f10df2af538c489294527fc231128 (diff)
eth-multiplexer: Fix error handling.
* eth-multiplexer/device_impl.c (ds_device_write): Do not deallocate data, it is destroyed by the server loop ("consume-on-success").
Diffstat (limited to 'eth-multiplexer')
-rw-r--r--eth-multiplexer/device_impl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/eth-multiplexer/device_impl.c b/eth-multiplexer/device_impl.c
index 4796d5b3..085a27e0 100644
--- a/eth-multiplexer/device_impl.c
+++ b/eth-multiplexer/device_impl.c
@@ -106,10 +106,8 @@ ds_device_write (struct vether_device *vdev, mach_port_t reply_port,
{
kern_return_t ret = 0;
if (vdev == NULL)
- {
- vm_deallocate (mach_task_self (), (vm_address_t) data, datalen);
- return D_NO_SUCH_DEVICE;
- }
+ return D_NO_SUCH_DEVICE;
+
/* The packet is forwarded to all virtual interfaces and
* the interface which the multiplexer connects to. */
broadcast_pack (data, datalen, vdev);