[easytag/easytag-2-2] Fix double unref in et_rename_file() error path
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/easytag-2-2] Fix double unref in et_rename_file() error path
- Date: Wed, 24 Dec 2014 13:25:41 +0000 (UTC)
commit 38a95ae551138812f4d3763154fa6fe0310a3ac9
Author: David King <amigadave amigadave com>
Date: Wed Dec 24 12:58:12 2014 +0000
Fix double unref in et_rename_file() error path
https://retrace.fedoraproject.org/faf2/problems/558544/
https://retrace.fedoraproject.org/faf2/problems/552602/
src/easytag.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/easytag.c b/src/easytag.c
index 53682d0..9f66865 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -3054,12 +3054,10 @@ et_rename_file (const char *old_filepath, const char *new_filepath,
/* Ignore an error if the directory already exists. */
if (!g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_EXISTS))
{
- g_object_unref (file_old);
- g_object_unref (file_new);
g_object_unref (file_new_parent);
- g_assert (error == NULL || *error != NULL);
- return FALSE;
+ goto err;
}
+
g_clear_error (error);
}
@@ -3143,7 +3141,6 @@ out:
return TRUE;
err:
- g_object_unref (file_new_parent);
g_object_unref (file_old);
g_object_unref (file_new);
g_assert (error == NULL || *error != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]