[libgdata] core: Fix a major memory leak in GDataDownloadStream
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] core: Fix a major memory leak in GDataDownloadStream
- Date: Fri, 10 Dec 2010 02:30:12 +0000 (UTC)
commit a26e978bff4cb83845a822e1ff9d4356a860f047
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 9b74efd..b5091f4 100644
--- a/gdata/gdata-download-stream.c
+++ b/gdata/gdata-download-stream.c
@@ -444,7 +444,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]