Try to avoid accessing profiling objects after they are freed.
[bluesky.git] / bluesky / log.c
index 6d5c590..89d4258 100644 (file)
@@ -469,6 +469,7 @@ static void cloudlog_partial_fetch_start(BlueSkyCacheFile *cachefile,
     async->key = g_strdup(cachefile->filename);
     async->start = offset;
     async->len = length;
+    async->profile = bluesky_profile_get();
     bluesky_store_async_add_notifier(async,
                                      (GFunc)cloudlog_partial_fetch_complete,
                                      cachefile);
@@ -550,6 +551,7 @@ static void cloudlog_fetch_start(BlueSkyCacheFile *cachefile)
     BlueSkyStoreAsync *async = bluesky_store_async_new(cachefile->fs->store);
     async->op = STORE_OP_GET;
     async->key = g_strdup(cachefile->filename);
+    async->profile = bluesky_profile_get();
     bluesky_store_async_add_notifier(async,
                                      (GFunc)cloudlog_partial_fetch_complete,
                                      cachefile);