summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-07 22:41:07 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-08 08:48:35 +0900
commit34883a12e7ec96e45a761536d164159dfa442cf4 (patch)
tree2913483e58d314f47f17edc7552fa1d17b82ea8f /src/lib/eina
parent50ab088f795cdfab18e7261c6c4fe409a36f1f55 (diff)
eina freeq - fix possible seg with NULL freeq and pattern fill logic
this fixes handling of a NULL freeq handle - found by coverity. fixes CID 1369021
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_freeq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/eina/eina_freeq.c b/src/lib/eina/eina_freeq.c
index 898e8c9ca8..5abb7b8f45 100644
--- a/src/lib/eina/eina_freeq.c
+++ b/src/lib/eina/eina_freeq.c
@@ -363,7 +363,8 @@ eina_freeq_ptr_add(Eina_FreeQ *fq,
363 363
364 if (!ptr) return; 364 if (!ptr) return;
365 if (!free_func) free_func = free; 365 if (!free_func) free_func = free;
366 if (!fq->postponed && (size < _eina_freeq_fillpat_max) && (size > 0)) 366 if ((((fq) && !fq->postponed) || (!fq)) &&
367 (size < _eina_freeq_fillpat_max) && (size > 0))
367 _eina_freeq_fill_do(ptr, size); 368 _eina_freeq_fill_do(ptr, size);
368 369
369 if (!fq || fq->bypass) 370 if (!fq || fq->bypass)