[mutter] xprops: Use meta_XFree instead of XFree in validate_or_free_results()



commit c937dd5ba3510a76eac10fc7681da022bb46ad84
Author: Hans de Goede <hdegoede redhat com>
Date:   Mon Sep 9 16:01:20 2019 +0200

    xprops: Use meta_XFree instead of XFree in validate_or_free_results()
    
    Use meta_XFree instead of XFree, letting meta_XFree do the NULL
    checks for us.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/786

 src/x11/xprops.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/x11/xprops.c b/src/x11/xprops.c
index 296cf7cf7..a26231537 100644
--- a/src/x11/xprops.c
+++ b/src/x11/xprops.c
@@ -165,12 +165,9 @@ validate_or_free_results (GetPropertyResults *results,
                 results->format, (int) results->n_items,
                 title, res_class, res_name);
 
-  if (type_name)
-    XFree (type_name);
-  if (expected_name)
-    XFree (expected_name);
-  if (prop_name)
-    XFree (prop_name);
+  meta_XFree (type_name);
+  meta_XFree (expected_name);
+  meta_XFree (prop_name);
 
   if (results->prop)
     {


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