[libgdata/libgdata-0-6] core: Fix a major memory leak in GDataDownloadStream



commit a11c03983bf79065082db2b899424422c5706a7c
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 316ea5f..7f2983d 100644
--- a/gdata/gdata-download-stream.c
+++ b/gdata/gdata-download-stream.c
@@ -418,7 +418,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]