summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-22 12:53:36 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-22 12:53:36 +0100
commit080f5c19972af35db7c6f54e420b7829c057e73b (patch)
tree73b13869fd0261203e27b8aec7a225453e37deae
parent5b43a74c6dd8c14548fb8addf9ae72d8be18fb8d (diff)
extra: cleanup before preview_get
this is needed in order to return the correct preview.
-rw-r--r--src/lib/extra_api_helper.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/extra_api_helper.c b/src/lib/extra_api_helper.c
index c36fcb1..084a4f7 100644
--- a/src/lib/extra_api_helper.c
+++ b/src/lib/extra_api_helper.c
@@ -201,10 +201,16 @@ typedef struct {
201} Extra_Download_Job; 201} Extra_Download_Job;
202 202
203static void 203static void
204_download_job_free(Extra_Download_Job *job) 204_download_clean_up(Extra_Download_Job *job)
205{ 205{
206 if (job->clean_up) 206 if (job->clean_up)
207 *job->clean_up = NULL; 207 *job->clean_up = NULL;
208}
209
210static void
211_download_job_free(Extra_Download_Job *job)
212{
213 _download_clean_up(job);
208 214
209 free(job->from); 215 free(job->from);
210 free(job->to); 216 free(job->to);
@@ -219,6 +225,8 @@ _download_complete_cb(void *data, const char *file EINA_UNUSED, int status EINA_
219 if (status != 200) 225 if (status != 200)
220 ecore_file_remove(file); 226 ecore_file_remove(file);
221 227
228 _download_clean_up(job);
229
222 if (job->req.progress.done_cb) 230 if (job->req.progress.done_cb)
223 job->req.progress.done_cb(job->req.progress.data); 231 job->req.progress.done_cb(job->req.progress.data);
224 232