From: sachiel Date: Thu, 16 Apr 2009 04:52:33 +0000 (+0000) Subject: Don't leak, and be consistent with return values. X-Git-Tag: accepted/2.0/20130306.225542~242^2~2487 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=452a562bf76bb89335379723b4ec1f31319088a4;p=profile%2Fivi%2Fevas.git Don't leak, and be consistent with return values. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@40101 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/engines/common/evas_font_draw.c b/src/lib/engines/common/evas_font_draw.c index 0c833ef..bc8c4b3 100644 --- a/src/lib/engines/common/evas_font_draw.c +++ b/src/lib/engines/common/evas_font_draw.c @@ -388,7 +388,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font prev_index = index; } #ifdef INTERNATIONAL_SUPPORT - if (bidi_err < 0) { + if (bidi_err >= 0) { free(level_list); free(text); } diff --git a/src/lib/engines/common/evas_intl_utils.c b/src/lib/engines/common/evas_intl_utils.c index 6ad1b45..6fcc099 100644 --- a/src/lib/engines/common/evas_intl_utils.c +++ b/src/lib/engines/common/evas_intl_utils.c @@ -29,8 +29,11 @@ evas_intl_utf8_to_visual(const char *text, int *ret_len, FriBidiCharType *direct /* if there's nothing to do, return text * one char draws are quite common */ - if (len <= 1) - return text; + if (len <= 1) { + *ret_len = len; + *embedding_level_list = NULL; + return strdup(text); + } byte_len = strlen(text); /* we need the actual number of bytes, not number of chars */