connectivity: memleak: drop async result reference on complete
==5177== 104 (+104) bytes in 1 (+1) blocks are definitely lost in loss record 5,502 of 6,581 ==5177== at 0x4C29BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==5177== by 0x7F4A6F5: g_malloc (gmem.c:97) ==5177== by 0x7F6159F: g_slice_alloc (gslice.c:1007) ==5177== by 0x7F61B6D: g_slice_alloc0 (gslice.c:1032) ==5177== by 0x7CDB9A3: g_type_create_instance (gtype.c:1847) ==5177== by 0x7CBF356: g_object_new_internal (gobject.c:1774) ==5177== by 0x7CC0D4C: g_object_newv (gobject.c:1922) ==5177== by 0x7CC14E3: g_object_new (gobject.c:1614) ==5177== by 0x79A4C57: g_simple_async_result_new (gsimpleasyncresult.c:319) ==5177== by 0x515B34: nm_connectivity_check_async (nm-connectivity.c:289) ==5177== by 0x515D74: run_check (nm-connectivity.c:217) ==5177== by 0x515DBF: idle_start_periodic_checks (nm-connectivity.c:229)
This commit is contained in:
@@ -186,6 +186,7 @@ nm_connectivity_check_cb (SoupSession *session, SoupMessage *msg, gpointer user_
|
||||
|
||||
g_simple_async_result_set_op_res_gssize (simple, new_state);
|
||||
g_simple_async_result_complete (simple);
|
||||
g_object_unref (simple);
|
||||
|
||||
g_free (cb_data->uri);
|
||||
g_free (cb_data->response);
|
||||
@@ -321,6 +322,7 @@ nm_connectivity_check_async (NMConnectivity *self,
|
||||
|
||||
g_simple_async_result_set_op_res_gssize (simple, priv->state);
|
||||
g_simple_async_result_complete_in_idle (simple);
|
||||
g_object_unref (simple);
|
||||
}
|
||||
|
||||
NMConnectivityState
|
||||
|
Reference in New Issue
Block a user