[sysprof/wip/chergert/sysprof-3] libsysprof-ui: fix dereference after steal



commit 76f5b78d38c7f70a244371c5f3c8698e9c27b6f0
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 22 16:20:04 2019 -0700

    libsysprof-ui: fix dereference after steal
    
    This is undefined behavior and most go right to left

 src/libsysprof/sysprof-proxy-source.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof/sysprof-proxy-source.c b/src/libsysprof/sysprof-proxy-source.c
index afb1a58..186b3db 100644
--- a/src/libsysprof/sysprof-proxy-source.c
+++ b/src/libsysprof/sysprof-proxy-source.c
@@ -476,7 +476,8 @@ sysprof_proxy_source_stop (SysprofSource *source)
                                   -1,
                                   NULL,
                                   sysprof_proxy_source_stop_cb,
-                                  g_steal_pointer (&monitor));
+                                  monitor);
+          monitor = NULL; /* stolen */
         }
       else
         {


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