mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
file-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
This commit is contained in:
@@ -184,12 +184,14 @@ test_readlink (void)
|
|||||||
data = g_file_read_link (link3, &error);
|
data = g_file_read_link (link3, &error);
|
||||||
g_assert (data == NULL && "could read link3");
|
g_assert (data == NULL && "could read link3");
|
||||||
g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT);
|
g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT);
|
||||||
|
g_error_free (error);
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
data = g_file_read_link (filename, &error);
|
data = g_file_read_link (filename, &error);
|
||||||
g_assert (data == NULL && "could read regular file as link");
|
g_assert (data == NULL && "could read regular file as link");
|
||||||
g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL);
|
g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL);
|
||||||
|
g_error_free (error);
|
||||||
|
|
||||||
remove (filename);
|
remove (filename);
|
||||||
remove (link1);
|
remove (link1);
|
||||||
remove (link2);
|
remove (link2);
|
||||||
|
Reference in New Issue
Block a user