eina: let's check for returned value of realloc.
authorCedric BAIL <c.bail@partner.samsung.com>
Thu, 5 Jun 2014 01:20:56 +0000 (03:20 +0200)
committerCedric BAIL <c.bail@partner.samsung.com>
Thu, 5 Jun 2014 01:20:56 +0000 (03:20 +0200)
CID 1039689.

src/lib/eina/eina_inarray.c

index c1e07be..2d52e6f 100644 (file)
@@ -606,7 +606,7 @@ eina_inarray_remove_at(Eina_Inarray *array, unsigned int position)
         memmove(p, p + sz, (array->len - position - 1) * sz);
      }
 
-   _eina_inarray_resize(array, array->len - 1);
+   if (!_eina_inarray_resize(array, array->len - 1)) return EINA_FALSE; /* should never fail as we reduce the buffer, but just let make compiler happy */
    array->len--;
    return EINA_TRUE;
 }