[at-spi2-core] Fix use after free when removing a hung process
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Fix use after free when removing a hung process
- Date: Wed, 20 Apr 2022 20:17:04 +0000 (UTC)
commit 9dbffc38e5c13aa6e0e0b234d8f6b3c431d62c3c
Author: Mike Gorse <mgorse suse com>
Date: Wed Apr 20 15:18:06 2022 -0500
Fix use after free when removing a hung process
registryd/deviceeventcontroller.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 06d7c5e5..0fe65556 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -896,8 +896,9 @@ reset_hung_process (DBusPendingCall *pending, void *data)
{
if (!strcmp (l->data, dest))
{
- hung_processes = g_slist_remove (hung_processes, l->data);
- g_free (l->data);
+ gpointer l_data = l->data;
+ hung_processes = g_slist_remove (hung_processes, l_data);
+ g_free (l_data);
break;
}
}
@@ -921,8 +922,9 @@ reset_hung_process_from_ping (DBusPendingCall *pending, void *data)
{
if (!strcmp (l->data, data))
{
- hung_processes = g_slist_remove (hung_processes, l->data);
- g_free (l->data);
+ gpointer l_data = l->data;
+ hung_processes = g_slist_remove (hung_processes, l_data);
+ g_free (l_data);
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]