[libgdata/libgdata-0-7] core: Fix a major memory leak in GDataDownloadStream
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/libgdata-0-7] core: Fix a major memory leak in GDataDownloadStream
- Date: Fri, 10 Dec 2010 22:40:01 +0000 (UTC)
commit 58fdb142798b8abf6924bb4e1f63bacb682ee3e8
Author: Philip Withnall <philip tecnocode co uk>
Date: Fri Dec 10 01:59:20 2010 +0000
core: Fix a major memory leak in GDataDownloadStream
It turns out that we were leaking the entirety of every file downloaded using
a GDataDownloadStream. Whoops.
gdata/gdata-download-stream.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gdata-download-stream.c b/gdata/gdata-download-stream.c
index 09712a1..272b71d 100644
--- a/gdata/gdata-download-stream.c
+++ b/gdata/gdata-download-stream.c
@@ -446,7 +446,7 @@ got_chunk_cb (SoupMessage *message, SoupBuffer *buffer, GDataDownloadStream *sel
return;
/* Push the data onto the buffer immediately */
- gdata_buffer_push_data (self->priv->buffer, g_memdup (buffer->data, buffer->length), buffer->length);
+ gdata_buffer_push_data (self->priv->buffer, (const guint8*) buffer->data, buffer->length);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]