[ostree] pull: Plug a memory leak
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] pull: Plug a memory leak
- Date: Tue, 30 Jun 2015 02:38:39 +0000 (UTC)
commit 31d16c9ccebd7e592fc19306ce5f4d3164ee1ed5
Author: Colin Walters <walters verbum org>
Date: Mon Jun 29 21:57:29 2015 -0400
pull: Plug a memory leak
src/libostree/ostree-fetcher.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
index 46b8c44..70735ca 100644
--- a/src/libostree/ostree-fetcher.c
+++ b/src/libostree/ostree-fetcher.c
@@ -601,9 +601,8 @@ ostree_fetcher_request_uri_internal (OstreeFetcher *self,
msg = soup_request_http_get_message ((SoupRequestHTTP*) pending->request);
if (exists && stbuf.st_size > 0)
soup_message_headers_set_range (msg->request_headers, stbuf.st_size, -1);
- g_hash_table_insert (self->message_to_request,
- soup_request_http_get_message ((SoupRequestHTTP*)pending->request),
- pending);
+ /* Transfer ownership */
+ g_hash_table_insert (self->message_to_request, msg, pending);
}
pending->out_tmpfile = tmpfile;
tmpfile = NULL; /* Transfer ownership */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]