[gupnp-av] Fixed memory leak that occurs when a resource has an invalid resolution.



commit 58f466e5754d1adadeeae8ff8c4c663f88437a18
Author: Mark Ryan <mark d ryan intel com>
Date:   Wed Apr 18 14:51:11 2012 +0200

    Fixed memory leak that occurs when a resource has an invalid resolution.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674325

 libgupnp-av/gupnp-didl-lite-resource.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgupnp-av/gupnp-didl-lite-resource.c b/libgupnp-av/gupnp-didl-lite-resource.c
index 43481f5..d905149 100644
--- a/libgupnp-av/gupnp-didl-lite-resource.c
+++ b/libgupnp-av/gupnp-didl-lite-resource.c
@@ -90,7 +90,7 @@ get_resolution_info (GUPnPDIDLLiteResource *resource,
         if (tokens == NULL || tokens[0] == NULL || tokens[1] == NULL) {
                 g_warning ("Failed to resolution string '%s'\n", resolution);
 
-                return;
+                goto return_point;
         }
 
         if (width)
@@ -98,6 +98,7 @@ get_resolution_info (GUPnPDIDLLiteResource *resource,
         if (height)
                 *height = atoi (tokens[1]);
 
+return_point:
         g_strfreev (tokens);
 }
 



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