[libgdata] picasaweb: Fix a memory leak in GDataPicasaWebService
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] picasaweb: Fix a memory leak in GDataPicasaWebService
- Date: Fri, 10 Dec 2010 17:53:39 +0000 (UTC)
commit 1f33f87086c6005f2938985c98575ab3a9f0d142
Author: Philip Withnall <philip tecnocode co uk>
Date: Fri Dec 10 12:12:17 2010 +0000
picasaweb: Fix a memory leak in GDataPicasaWebService
gdata/services/picasaweb/gdata-picasaweb-service.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdata/services/picasaweb/gdata-picasaweb-service.c b/gdata/services/picasaweb/gdata-picasaweb-service.c
index fa9c365..7b911dd 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-service.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-service.c
@@ -603,18 +603,20 @@ upload_file_async_cb (GOutputStream *output_stream, GAsyncResult *result, Upload
if (error == NULL)
file = parse_spliced_stream (output_stream, &error);
- if (error == NULL && file != NULL)
+ if (error == NULL && file != NULL) {
async_result = g_simple_async_result_new (G_OBJECT (data->service), (GAsyncReadyCallback) data->callback,
data->user_data, gdata_picasaweb_service_upload_file_async);
- else
+ } else {
async_result = g_simple_async_result_new_from_error (G_OBJECT (data->service), (GAsyncReadyCallback) data->callback,
data->user_data, error);
+ }
g_simple_async_result_set_op_res_gpointer (async_result, file, NULL);
g_simple_async_result_complete (async_result);
upload_file_async_data_free (data);
+ g_object_unref (async_result);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]