mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
tests: fix memory leaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
d6ed25d143
commit
e1461bcfd3
@ -97,6 +97,8 @@ START_PARAMETRIZED_TEST (test_serialize, test_serialize_ds)
|
||||
|
||||
g_free (actual_result);
|
||||
|
||||
if (error != NULL)
|
||||
g_error_free (error);
|
||||
}
|
||||
/* *INDENT-OFF* */
|
||||
END_PARAMETRIZED_TEST
|
||||
|
@ -155,8 +155,12 @@ START_TEST (test_path_serialize)
|
||||
/* when */
|
||||
vpath = vfs_path_from_str_flags (ETALON_PATH_STR, VPF_USE_DEPRECATED_PARSER);
|
||||
serialized_vpath = vfs_path_serialize (vpath, &error);
|
||||
|
||||
vfs_path_free (vpath);
|
||||
|
||||
if (error != NULL)
|
||||
g_error_free (error);
|
||||
|
||||
/* then */
|
||||
mctest_assert_ptr_ne (serialized_vpath, NULL);
|
||||
mctest_assert_str_eq (serialized_vpath, ETALON_SERIALIZED_PATH);
|
||||
|
@ -128,6 +128,8 @@ parse_command_line (int *argc, char **argv[])
|
||||
if (!g_option_context_parse (context, argc, argv, &error))
|
||||
{
|
||||
g_print ("option parsing failed: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user