[nautilus-actions] src/io-desktop/nadp-desktop-file.c: slightly optimize code
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] src/io-desktop/nadp-desktop-file.c: slightly optimize code
- Date: Sat, 26 Nov 2011 21:49:33 +0000 (UTC)
commit 0629ff855993d0348ccfd2c3e71d0db74b9e0993
Author: Pierre Wieser <pwieser trychlos org>
Date: Sat Nov 26 22:06:21 2011 +0100
src/io-desktop/nadp-desktop-file.c: slightly optimize code
ChangeLog | 3 +++
src/io-desktop/nadp-desktop-file.c | 5 ++---
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7991193..6ba6f0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-11-26 Pierre Wieser <pwieser trychlos org>
+ * src/io-desktop/nadp-desktop-file.c (nadp_desktop_file_new_from_uri):
+ Slightly optimize code.
+
* src/core/na-importer.c (na_importer_import_from_list): Fix comments.
* src/io-xml/naxml-reader.c (naxml_reader_import_from_uri): Do not return
diff --git a/src/io-desktop/nadp-desktop-file.c b/src/io-desktop/nadp-desktop-file.c
index 50184e1..ec51eb1 100644
--- a/src/io-desktop/nadp-desktop-file.c
+++ b/src/io-desktop/nadp-desktop-file.c
@@ -285,18 +285,17 @@ nadp_desktop_file_new_from_uri( const gchar *uri )
error = NULL;
g_key_file_load_from_data( ndf->private->key_file, data, length, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &error );
+ g_free( data );
+
if( error ){
if( error->code != G_KEY_FILE_ERROR_GROUP_NOT_FOUND ){
g_warning( "%s: %s", thisfn, error->message );
}
g_error_free( error );
g_object_unref( ndf );
- g_free( data );
return( NULL );
}
- g_free( data );
-
if( !check_key_file( ndf )){
g_object_unref( ndf );
return( NULL );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]