[PATCH v2 06/15] char-device: Avoid use-after-free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Reset pointer after freeing the structure pointing to it.
Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 server/char-device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/char-device.c b/server/char-device.c
index 3056f51..2957a1b 100644
--- a/server/char-device.c
+++ b/server/char-device.c
@@ -212,6 +212,7 @@ static void red_char_device_client_free(RedCharDevice *dev,
 
     if (dev_client->wait_for_tokens_timer) {
         reds_core_timer_remove(dev->priv->reds, dev_client->wait_for_tokens_timer);
+        dev_client->wait_for_tokens_timer = NULL;
     }
 
     red_char_device_client_send_queue_free(dev, dev_client);
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]