[gnome-desktop] gnome-rr: fix crash in update_brightness_limits



commit fa5688ef9d73c2155bec38827dea466d028bda0e
Author: Ray Strode <rstrode redhat com>
Date:   Tue Sep 13 11:31:23 2011 -0400

    gnome-rr: fix crash in update_brightness_limits
    
    XFree() isn't as forgiving as free() about NULL pointers.

 libgnome-desktop/gnome-rr.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 3cab1ed..8c5e9c9 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -1558,7 +1558,10 @@ update_brightness_limits (GnomeRROutput *output)
     output->backlight_min = info->values[0];
     output->backlight_max = info->values[1];
 out:
-    XFree (info);
+    if (info != NULL)
+    {
+        XFree (info);
+    }
 #endif
 }
 



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