From e56ef78d920e7476d7796e36ea26232a83f9147c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 24 Aug 2009 10:23:03 +0200 Subject: [PATCH] xutil: get_text_property_from_reply return strdup Signed-off-by: Julien Danjou --- common/xutil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/xutil.h b/common/xutil.h index b5e80f49..bf14bed3 100644 --- a/common/xutil.h +++ b/common/xutil.h @@ -31,7 +31,7 @@ #include "common/array.h" #include "common/atoms.h" -static inline const char * +static inline char * xutil_get_text_property_from_reply(xcb_get_property_reply_t *reply) { if(reply @@ -40,7 +40,7 @@ xutil_get_text_property_from_reply(xcb_get_property_reply_t *reply) || reply->type == COMPOUND_TEXT) && reply->format == 8 && xcb_get_property_value_length(reply)) - return xcb_get_property_value(reply); + return a_strndup(xcb_get_property_value(reply), xcb_get_property_value_length(reply)); return NULL; }