stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=885d5b5b689e14152e9273ae89ba3f4d0bb5049b

commit 885d5b5b689e14152e9273ae89ba3f4d0bb5049b
Author: Stefan Schmidt <s.schm...@samsung.com>
Date:   Fri Sep 20 11:19:51 2019 +0200

    efl_ui_exact_model: fix always true condition
    
    The tbuf binbuffer has already been freed the line above, which means
    this condition would always be true as !tbuf would always result in true.
    As a result the rest of the function has never been executed.
    
    Reviewed-by: Mike Blumenkrantz <michael.blumenkra...@gmail.com>
    Differential Revision: https://phab.enlightenment.org/D10046
---
 src/lib/elementary/efl_ui_exact_model.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_exact_model.c 
b/src/lib/elementary/efl_ui_exact_model.c
index 23b97db7e9..b12cfba8bd 100644
--- a/src/lib/elementary/efl_ui_exact_model.c
+++ b/src/lib/elementary/efl_ui_exact_model.c
@@ -81,10 +81,11 @@ _efl_ui_exact_model_slot_compress(unsigned int index, 
Eina_List *compressed, uns
    _efl_ui_exact_model_list_find(list_index, compressed, &l);
 
    tbuf = eina_binbuf_manage_new((unsigned char *) buffer, 
EFL_UI_EXACT_MODEL_CONTENT_LENGTH, EINA_TRUE);
+   if (!tbuf) return compressed;
+
    cbuf = emile_compress(tbuf, EMILE_LZ4, EMILE_COMPRESSOR_FAST);
    eina_binbuf_free(tbuf);
-
-   if (!tbuf || !cbuf) return compressed;
+   if (!cbuf) return compressed;
 
    // Make sure the list has all the buffer up to the needed one filled with 
valid data
    if (list_index)

-- 


Reply via email to