projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa9942c
)
pull: Assign idle_src variable before calling unref()
author
Colin Walters
<walters@verbum.org>
Tue, 18 Aug 2020 23:34:57 +0000
(23:34 +0000)
committer
Colin Walters
<walters@verbum.org>
Tue, 18 Aug 2020 23:34:57 +0000
(23:34 +0000)
This should pacify Coverity, and also just "reads" better too.
src/libostree/ostree-repo-pull.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-repo-pull.c
b/src/libostree/ostree-repo-pull.c
index 894e4b1fe3259b6849af5f0a4c7997a2cadb9325..d817575bf790fb1a4a11d1920662485d9dbdcdb2 100644
(file)
--- 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 {