[nautilus/gnome-3-26] window-slot: Clear pending_selection after freeing it
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-26] window-slot: Clear pending_selection after freeing it
- Date: Thu, 19 Jul 2018 18:48:23 +0000 (UTC)
commit 6d6ae80522c37f4a42f7d29e956b392cc345532c
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Apr 19 04:19:51 2018 -0500
window-slot: Clear pending_selection after freeing it
This might not be the case when handling archive files, in fact we were
freeing the list and assigning it to a new value for non-archive files,
but in case of archives the list was just freed and the invalid pointer
kept around, potentially causing a later crash.
src/nautilus-window-slot.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 39e9380db..7b272442c 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1592,11 +1592,7 @@ handle_regular_file_if_needed (NautilusWindowSlot *self,
if ((parent_file != NULL) &&
nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR)
{
- if (priv->pending_selection != NULL)
- {
- nautilus_file_list_free (priv->pending_selection);
- }
-
+ g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
g_clear_object (&priv->pending_location);
g_clear_object (&priv->pending_file_to_activate);
g_free (priv->pending_scroll_to);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]