[easytag] Fix double unref in et_rename_file() error path
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Fix double unref in et_rename_file() error path
- Date: Wed, 24 Dec 2014 13:24:49 +0000 (UTC)
commit 153a2f2f822714d9157497f764824df1ff1b1a78
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 5d07bac..cf24156 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -741,12 +741,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);
}
@@ -830,7 +828,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]