fix memroy leak
authorBoram Park <boram1288.park@samsung.com>
Wed, 23 Oct 2013 06:26:13 +0000 (15:26 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 23 Oct 2013 06:26:13 +0000 (15:26 +0900)
Change-Id: I6837c43e0e007749a15707d5d9ab6d41ee3d1d52

x11.c

diff --git a/x11.c b/x11.c
index 1663f1c..af8f3c1 100644 (file)
--- a/x11.c
+++ b/x11.c
@@ -1678,6 +1678,11 @@ _init_screen_shot_dri2 (ShotInfo *info)
 
     info->enable_xshm = False;
 
+    if (driverName)
+        free (driverName);
+    if (deviceName)
+        free (deviceName);
+
     return True;
 
 fail_init_dri2:
@@ -1691,6 +1696,11 @@ fail_init_dri2:
     if (info->drm_fd >= 0)
         close (info->drm_fd);
 
+    if (driverName)
+        free (driverName);
+    if (deviceName)
+        free (deviceName);
+
     return False;
 }