summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@src.gnome.org>2016-08-22 19:43:24 +0300
committerErnestas Kulik <ernestask@src.gnome.org>2016-08-22 21:01:00 +0300
commit7f91af56d812997c26fccc75437f2ea78c99fb0f (patch)
tree53fd037f01b35ade24759025af59e896e65a394f
parentd4995306cc0ce6227928465d7e59a27a5036c90e (diff)
downloadnautilus-7f91af56d812997c26fccc75437f2ea78c99fb0f.tar.gz
file-operations: zero-initialize pointer
The file_info autoptr in transfer_add_file_to_count() is not zero-initialized and the function conditionally returns early, which could result in a crash. This commit fixes that. https://bugzilla.gnome.org/show_bug.cgi?id=769383
-rw-r--r--src/nautilus-file-operations.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 0801b7c7c..804a1c773 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -2016,7 +2016,7 @@ transfer_add_file_to_count (GFile *file,
CommonJob *job,
TransferInfo *transfer_info)
{
- g_autoptr (GFileInfo) file_info;
+ g_autoptr (GFileInfo) file_info = NULL;
if (g_cancellable_is_cancelled (job->cancellable)) {
return;