[balsa/wip/gtk4: 351/351] address-book-text: Use g_clear_pointer()



commit f28449806d8f687dae0be4f5e186c88c14cfb477
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon May 21 19:12:01 2018 -0400

    address-book-text: Use g_clear_pointer()

 libbalsa/address-book-text.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libbalsa/address-book-text.c b/libbalsa/address-book-text.c
index 3d06fe2..ba12724 100644
--- a/libbalsa/address-book-text.c
+++ b/libbalsa/address-book-text.c
@@ -433,8 +433,8 @@ lbab_text_open_temp(LibBalsaAddressBookText * ab_text, gchar ** path,
         g_message("Failed to open temporary address book file ā€œ%sā€\n"
                   " changes not saved", *path);
 #endif                          /* DEBUG */
-        g_free(*path);
-        *path = NULL;
+        g_clear_pointer(path, g_free);
+
         return LBABERR_CANNOT_WRITE;
     }
     return LBABERR_OK;


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