[PATCH 1/2] config: only free odev->attrib_name for string types

Peter Hutterer peter.hutterer at who-t.net
Mon Mar 10 21:30:56 PDT 2014


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 config/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/config/config.c b/config/config.c
index 7971b87..4ad7330 100644
--- a/config/config.c
+++ b/config/config.c
@@ -246,7 +246,8 @@ config_odev_free_attributes(struct OdevAttributes *attribs)
         case ODEV_ATTRIB_FD: fd = iter->attrib_value; break;
         }
         xorg_list_del(&iter->member);
-        free(iter->attrib_name);
+        if (iter->attrib_type == ODEV_ATTRIB_STRING)
+            free(iter->attrib_name);
         free(iter);
     }
 
-- 
1.8.5.3



More information about the xorg-devel mailing list