[nautilus] file-operations: move: fix potential GError leaks



commit 09670c24ed63d54d0b93659c7e1d68d69680e9a4
Author: Pavel Vasin <rat4vier gmail com>
Date:   Fri Aug 24 12:21:22 2012 +0400

    file-operations: move: fix potential GError leaks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682603

 libnautilus-private/nautilus-file-operations.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 3796ffa..5aa9595 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -4835,6 +4835,8 @@ move_file_prepare (CopyMoveJob *move_job,
 
 	if (IS_IO_ERROR (error, INVALID_FILENAME) &&
 	    !handled_invalid_filename) {
+		g_error_free (error);
+
 		handled_invalid_filename = TRUE;
 
 		g_assert (*dest_fs_type == NULL);
@@ -4925,6 +4927,7 @@ move_file_prepare (CopyMoveJob *move_job,
 	/* Other error */
 	else {
 		if (job->skip_all_error) {
+			g_error_free (error);
 			goto out;
 		}
 		primary = f (_("Error while moving â%Bâ."), src);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]