]> git.itanic.dy.fi Git - maemo-mapper/blobdiff - src/path.c
Fix some memory leaks. Fixes: #2099.
[maemo-mapper] / src / path.c
index 5c8aa0e55deb7d995df8f4e5bea1904d73b4b8d9..b00796fcb1765010accd5cf147cc21abd6f50e5d 100644 (file)
@@ -653,8 +653,10 @@ route_download_and_setup(GtkWidget *parent, const gchar *source_url,
     }
 
     /* Attempt to download the route from the server. */
-    if(GNOME_VFS_OK != (vfs_result = gnome_vfs_read_entire_file(
-                buffer, &size, &bytes)))
+    vfs_result = gnome_vfs_read_entire_file(buffer, &size, &bytes);
+    g_free (buffer);
+
+    if(vfs_result != GNOME_VFS_OK)
     {
         g_free(bytes);
         popup_error(parent, gnome_vfs_result_to_string(vfs_result));