blob: 4494224c5b9f6bdf4bbeefd3de002c87869d6211 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From 60559a15e170ad49b388ee442eb2ccbe483bc9aa Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Mon, 19 Nov 2012 19:50:47 -0500
Subject: [PATCH] update: fix use after free
mark the address space as unread so that we don't attempt a double free
on a repo download failure during the final cleanup.
---
src/update.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/update.c b/src/update.c
index c2e76e5..0b4fb8a 100644
--- a/src/update.c
+++ b/src/update.c
@@ -552,7 +552,7 @@ static int add_repo_download(CURLM *multi, struct repo_t *repo)
} else {
curl_multi_remove_handle(multi, repo->curl);
FREE(repo->url);
- free(repo->data);
+ FREE(repo->data);
repo->buflen = 0;
repo->server_idx++;
}
--
1.8.0
|