[test] Fix mismatched free.

A couple of strings allocated using glib functions but freed with system
malloc.

Reported: http://bugs.freedesktop.org/show_bug.cgi?id=19210.
This commit is contained in:
Chris Wilson 2008-12-20 19:27:33 +00:00
parent 6662eede2a
commit 19e8c5c7f4

View file

@ -56,11 +56,11 @@ int main (int argc, char *argv[])
} else {
gchar *dir = g_get_current_dir ();
absolute = g_build_filename (dir, filename, (gchar *) 0);
free (dir);
g_free (dir);
}
uri = g_filename_to_uri (absolute, NULL, &error);
free (absolute);
g_free (absolute);
if (uri == NULL)
FAIL (error->message);