diff options
author | Colin Walters <walters@verbum.org> | 2020-08-18 23:34:57 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2020-08-18 23:34:57 +0000 |
commit | 1eab48363ba385cba5d57aa09e5a7218d12f25b5 (patch) | |
tree | 5b10d531b5534c0d10bea715227e4f4b1a4d630a /src/libostree/ostree-repo-pull.c | |
parent | fa9942c7ad52cecdcc7b01627448dc998ec5439b (diff) | |
download | ostree-1eab48363ba385cba5d57aa09e5a7218d12f25b5.tar.gz |
pull: Assign idle_src variable before calling unref()
This should pacify Coverity, and also just "reads" better too.
Diffstat (limited to 'src/libostree/ostree-repo-pull.c')
-rw-r--r-- | src/libostree/ostree-repo-pull.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 894e4b1f..d817575b 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -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 { |