Skip to content

Commit

Permalink
fixup! curl: Fix use-after-free
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Jan 11, 2017
1 parent 485ce95 commit d8a591f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libostree/ostree-fetcher-curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d8a591f

Please sign in to comment.