summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-02-19 07:50:35 +0100
committerThomas Haller <thaller@redhat.com>2019-02-19 09:33:05 +0100
commit25a3825b51e6325be8275cc7edf150852709b5af (patch)
tree9c7066c3135cef27c19534c486ccfbbdde56fce7
parentc9244d28ae83d4345b4b8f87beb8e984cb40a991 (diff)
downloadNetworkManager-25a3825b51e6325be8275cc7edf150852709b5af.tar.gz
libnm: fix duplicate free in nm_client_checkpoint_rollback()
#0 0x00007fffea7481e5 in _g_log_abort (breakpoint=1) at gmessages.c:554 #1 0x00007fffea74951d in g_logv (log_domain=0x7fffea78e00e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffcbb0) at gmessages.c:1371 #2 0x00007fffea7496f3 in g_log (log_domain=log_domain@entry=0x7fffea78e00e "GLib", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7fffea798320 "%s: assertion '%s' failed") at gmessages.c:1413 #3 0x00007fffea749f2d in g_return_if_fail_warning (log_domain=log_domain@entry=0x7fffea78e00e "GLib", pretty_function=pretty_function@entry=0x7fffea799d40 <__func__.4759> "g_atomic_ref_count_dec", expression=expression@entry=0x7fffea799ca1 "g_atomic_int_get (arc) > 0") at gmessages.c:2762 #4 0x00007fffea754c12 in g_atomic_ref_count_dec (arc=arc@entry=0x5555558c5280) at grefcount.c:260 #5 0x00007fffea7302c6 in g_hash_table_unref (hash_table=0x5555558c5240) at ghash.c:1101 #6 0x00007fffea4b6dbc in clear_op_res (simple=0x55555587ed90 [GSimpleAsyncResult]) at gsimpleasyncresult.c:248 #7 0x00007fffea4b6dbc in g_simple_async_result_finalize (object=0x55555587ed90 [GSimpleAsyncResult]) at gsimpleasyncresult.c:268 #8 0x00007fffea67b949 in g_object_unref (_object=<optimized out>) at gobject.c:3346 #9 0x00007fffea67b949 in g_object_unref (_object=0x55555587ed90) at gobject.c:3238 #10 0x00007fffe95dea2d in checkpoint_rollback_cb (object=<optimized out>, result=<optimized out>, user_data=0x55555587ed90) at libnm/nm-manager.c:1584 #11 0x00007fffea4ca834 in g_task_return_now (task=0x5555558b5c80 [GTask]) at gtask.c:1148 #12 0x00007fffea4cb196 in g_task_return (task=0x5555558b5c80 [GTask], type=<optimized out>) at gtask.c:1206 #13 0x00007fffea5096bb in reply_cb (connection=<optimized out>, res=<optimized out>, user_data=0x5555558b5c80) at gdbusproxy.c:2596 #14 0x00007fffea4ca834 in g_task_return_now (task=0x5555558b5d50 [GTask]) at gtask.c:1148 #15 0x00007fffea4cb196 in g_task_return (task=0x5555558b5d50 [GTask], type=<optimized out>) at gtask.c:1206 #16 0x00007fffea4fdd4a in g_dbus_connection_call_done (source=<optimized out>, result=0x5555558b5e20, user_data=0x5555558b5d50) at gdbusconnection.c:5715 #17 0x00007fffea4ca834 in g_task_return_now (task=0x5555558b5e20 [GTask]) at gtask.c:1148 #18 0x00007fffea4ca86d in complete_in_idle_cb (task=task@entry=0x5555558b5e20) at gtask.c:1162 #19 0x00007fffea73e97b in g_idle_dispatch (source=0x7fffdc04eb90, callback=0x7fffea4ca860 <complete_in_idle_cb>, user_data=0x5555558b5e20) at gmain.c:5620 #20 0x00007fffea74206d in g_main_dispatch (context=0x5555557c8410) at gmain.c:3182 #21 0x00007fffea74206d in g_main_context_dispatch (context=context@entry=0x5555557c8410) at gmain.c:3847 #22 0x00007fffea742438 in g_main_context_iterate (context=0x5555557c8410, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3920 #23 0x00007fffea742762 in g_main_loop_run (loop=0x55555584ed00) at gmain.c:4116 Fixes: c3efedf54bc64fd130849096849540ed1294df55
-rw-r--r--libnm/nm-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c
index 4d8c223a48..5e4735fe39 100644
--- a/libnm/nm-manager.c
+++ b/libnm/nm-manager.c
@@ -1622,7 +1622,7 @@ nm_manager_checkpoint_rollback_finish (NMManager *manager,
if (g_simple_async_result_propagate_error (simple, error))
return NULL;
else
- return g_simple_async_result_get_op_res_gpointer (simple);
+ return g_hash_table_ref (g_simple_async_result_get_op_res_gpointer (simple));
}
static void