Commit a0f5e89a authored by Simon McVittie's avatar Simon McVittie

testglib: test_file_functions: don't close fd if it's -1

Signed-off-by: Simon McVittie's avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115Reviewed-by: Matthias Clasen's avatarMatthias Clasen <mclasen@redhat.com>
parent fedc0cff
......@@ -952,7 +952,8 @@ test_file_functions (void)
else
g_print ("g_file_open_tmp correctly returns error: %s\n", error->message);
}
close (fd);
if (fd != -1)
close (fd);
g_clear_error (&error);
#ifdef G_OS_WIN32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment