[at-spi2-core] Fix memory leak in atspi_accessible_get_role_name



commit 5da70658ed42ab4e33e8b47db2e930bb5977d624
Author: Mike Gorse <mgorse suse com>
Date:   Wed Jul 10 13:47:55 2013 -0500

    Fix memory leak in atspi_accessible_get_role_name
    
    Only dup the string once.

 atspi/atspi-misc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index be908b5..8f84a14 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -1706,7 +1706,7 @@ atspi_role_get_name (AtspiRole role)
     }
 
   if (retval)
-    return _atspi_name_compat (g_strdup (retval));
+    return _atspi_name_compat (retval);
 
   return NULL;
 }


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