Add ecore_x_randr_crtc_info_free function.
authorChristopher Michael <cp.michael@samsung.com>
Thu, 7 Feb 2013 12:43:55 +0000 (12:43 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Thu, 7 Feb 2013 12:43:55 +0000 (12:43 +0000)
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 83739

src/lib/ecore_x/xlib/ecore_x_randr.c

index 63dd2d2..5fa6b07 100644 (file)
@@ -1847,6 +1847,26 @@ ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc)
 }
 
 /*
+ * @since 1.8
+ */
+EAPI void 
+ecore_x_randr_crtc_info_free(Ecore_X_Randr_Crtc_Info *info)
+{
+#ifdef ECORE_XRANDR
+   if (_randr_version >= RANDR_VERSION_1_2)
+     {
+        if (info)
+          {
+             if (info->outputs) free(info->outputs);
+             if (info->possible) free(info->possible);
+             free(info);
+             info = NULL;
+          }
+     }
+#endif
+}
+
+/*
  * @brief Add given mode to given output.
  *
  * @param output The output the mode is added to.