summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-22 13:08:36 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-22 13:08:36 +0000
commitd3a80a9aae980bf7ce532a59fdab0df25419b59b (patch)
treead75a26fdd7cf0dd45bcc0d16819be18d55ddcbc
parent677d757a6cfe7dbca2272b6311742e127097a2f0 (diff)
downloadnetsurf-d3a80a9aae980bf7ce532a59fdab0df25419b59b.tar.gz
netsurf-d3a80a9aae980bf7ce532a59fdab0df25419b59b.tar.bz2
Monkey: Clean up on completion of downloads
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--frontends/monkey/download.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/frontends/monkey/download.c b/frontends/monkey/download.c
index 1c516e367..b9ca1746f 100644
--- a/frontends/monkey/download.c
+++ b/frontends/monkey/download.c
@@ -34,6 +34,7 @@ struct gui_download_window {
struct gui_download_window *r_next;
struct gui_download_window *r_prev;
struct gui_window *g;
+ download_context *dlctx;
uint32_t dwin_num;
char *host; /* ignore */
};
@@ -49,6 +50,7 @@ gui_download_window_create(download_context *ctx,
return NULL;
ret->g = parent;
ret->dwin_num = dwin_ctr++;
+ ret->dlctx = ctx;
RING_INSERT(dw_ring, ret);
@@ -79,6 +81,7 @@ gui_download_window_done(struct gui_download_window *dw)
{
moutf(MOUT_DOWNLOAD, "DONE DWIN %u", dw->dwin_num);
RING_REMOVE(dw_ring, dw);
+ download_context_destroy(dw->dlctx);
free(dw);
}