Blob Blame History Raw
From 7dadb5f4e70eca646a855872d0137e145eeececd Mon Sep 17 00:00:00 2001
From: rbuj <robert.buj@gmail.com>
Date: Mon, 8 Nov 2021 18:48:30 +0100
Subject: [PATCH 2/8] na-selected-info: fix memory leak

---
 src/core/na-selected-info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/na-selected-info.c b/src/core/na-selected-info.c
index 9d4084e..abf5627 100644
--- a/src/core/na-selected-info.c
+++ b/src/core/na-selected-info.c
@@ -874,7 +874,7 @@ query_file_attributes( NASelectedInfo *nsi, GFile *location, gchar **errmsg )
 	}
 
 	if( !nsi->private->mimetype ){
-		nsi->private->mimetype = g_strdup( g_file_info_get_attribute_as_string( info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE ));
+		nsi->private->mimetype = g_file_info_get_attribute_as_string( info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE );
 	}
 
 	nsi->private->file_type = ( GFileType ) g_file_info_get_attribute_uint32( info, G_FILE_ATTRIBUTE_STANDARD_TYPE );
@@ -883,7 +883,7 @@ query_file_attributes( NASelectedInfo *nsi, GFile *location, gchar **errmsg )
 	nsi->private->can_write = g_file_info_get_attribute_boolean( info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE );
 	nsi->private->can_execute = g_file_info_get_attribute_boolean( info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE );
 
-	nsi->private->owner = g_strdup( g_file_info_get_attribute_as_string( info, G_FILE_ATTRIBUTE_OWNER_USER ));
+	nsi->private->owner = g_file_info_get_attribute_as_string( info, G_FILE_ATTRIBUTE_OWNER_USER );
 
 	nsi->private->attributes_are_set = TRUE;
 
-- 
2.31.1