From d8a591fbd31c40d7ab058262bd2e36f95bd23d1b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 11 Jan 2017 15:11:57 -0500 Subject: [PATCH] fixup! curl: Fix use-after-free --- src/libostree/ostree-fetcher-curl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c index f66e6ae45f..14151811ba 100644 --- a/src/libostree/ostree-fetcher-curl.c +++ b/src/libostree/ostree-fetcher-curl.c @@ -386,6 +386,8 @@ update_timeout_cb (CURLM *multi, long timeout_ms, void *userp) { OstreeFetcher *fetcher = userp; + if (fetcher->timer_event) + g_source_destroy (fetcher->timer_event); fetcher->timer_event = g_timeout_source_new (timeout_ms); g_source_set_callback (fetcher->timer_event, timer_cb, fetcher, NULL); g_source_attach (fetcher->timer_event, fetcher->mainctx);