pull: Assign idle_src variable before calling unref()

This should pacify Coverity, and also just "reads" better too.
This commit is contained in:
Colin Walters 2020-08-18 23:34:57 +00:00
parent fa9942c7ad
commit 1eab48363b
1 changed files with 2 additions and 1 deletions

View File

@ -436,8 +436,9 @@ ensure_idle_queued (OtPullData *pull_data)
idle_src = g_idle_source_new ();
g_source_set_callback (idle_src, idle_worker, pull_data, NULL);
g_source_attach (idle_src, pull_data->main_context);
g_source_unref (idle_src);
pull_data->idle_src = idle_src;
/* Ownership is transferred to pull_data */
g_source_unref (idle_src);
}
typedef struct {