gnome-desktop r5406 - trunk/libgnome-desktop
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-desktop r5406 - trunk/libgnome-desktop
- Date: Wed, 18 Feb 2009 01:12:02 +0000 (UTC)
Author: federico
Date: Wed Feb 18 01:12:01 2009
New Revision: 5406
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5406&view=rev
Log:
Don't leak a MonitorInfo in case the EDID data cannot be decoded
Signed-off-by: Federico Mena Quintero <federico novell com>
Modified:
trunk/libgnome-desktop/ChangeLog
trunk/libgnome-desktop/edid-parse.c
Modified: trunk/libgnome-desktop/edid-parse.c
==============================================================================
--- trunk/libgnome-desktop/edid-parse.c (original)
+++ trunk/libgnome-desktop/edid-parse.c Wed Feb 18 01:12:01 2009
@@ -524,29 +524,20 @@
decode_check_sum (edid, info);
- if (!decode_header (edid))
+ if (decode_header (edid)
+ && decode_vendor_and_product_identification (edid, info)
+ && decode_edid_version (edid, info)
+ && decode_display_parameters (edid, info)
+ && decode_color_characteristics (edid, info)
+ && decode_established_timings (edid, info)
+ && decode_standard_timings (edid, info)
+ && decode_descriptors (edid, info))
+ {
+ return info;
+ }
+ else
+ {
+ g_free (info);
return NULL;
-
- if (!decode_vendor_and_product_identification (edid, info))
- return NULL;
-
- if (!decode_edid_version (edid, info))
- return NULL;
-
- if (!decode_display_parameters (edid, info))
- return NULL;
-
- if (!decode_color_characteristics (edid, info))
- return NULL;
-
- if (!decode_established_timings (edid, info))
- return NULL;
-
- if (!decode_standard_timings (edid, info))
- return NULL;
-
- if (!decode_descriptors (edid, info))
- return NULL;
-
- return info;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]