[librest] proxy-call: Fix memory leaks in multipart form REST calls.



commit 18a525d90de3ffe9c9b48233ef61c60eda450518
Author: Eitan Isaacson <eitan monotonous org>
Date:   Tue Feb 15 15:03:17 2011 -0800

    proxy-call: Fix memory leaks in multipart form REST calls.
    
    https://bugs.meego.com/show_bug.cgi?id=13726

 rest/rest-proxy-call.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index efd8a05..22272f8 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -780,10 +780,14 @@ prepare_message (RestProxyCall *call, GError **error_out)
                                          rest_param_get_file_name (param),
                                          rest_param_get_content_type (param),
                                          sb);
+
+        soup_buffer_free (sb);
       }
     }
 
     message = soup_form_request_new_from_multipart (priv->url, mp);
+
+    soup_multipart_free (mp);
   }
 
   /* Set the user agent, if one was set in the proxy */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]