[libsoup/gnome-3-0] soup-cache: free params hash list



commit c02233c3c9601a126e6e1e05ee3bbbe38329fde3
Author: Xan Lopez <xlopez igalia com>
Date:   Thu May 5 13:42:20 2011 -0700

    soup-cache: free params hash list
    
    There's one code path where we can exit the method without freeing
    it. Plug the leak.

 libsoup/soup-cache.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c
index 5b64575..ca9108a 100644
--- a/libsoup/soup-cache.c
+++ b/libsoup/soup-cache.c
@@ -1343,8 +1343,10 @@ soup_cache_has_response (SoupCache *cache, SoupMessage *msg)
 			max_age = (int)MIN (g_ascii_strtoll (value, NULL, 10), G_MAXINT32);
 			/* Forcing cache revalidaton
 			 */
-			if (!max_age)
+			if (!max_age) {
+				soup_header_free_param_list (hash);
 				return SOUP_CACHE_RESPONSE_NEEDS_VALIDATION;
+			}
 		}
 
 		/* max-stale can have no value set, we need to use _extended */



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