eina: make eina_binbuf_free and eina_strbuff_free accept NULL.

We do follow free() logic here and accept NULL for all eina_*_free() functions.
This patch just do so for Eina_Binbuf and Eina_Strbuf.
This commit is contained in:
Cedric BAIL 2014-01-02 12:11:38 +09:00
parent d6d8a910fe
commit 37c1c4e9f6
1 changed files with 2 additions and 0 deletions

View File

@ -77,6 +77,8 @@ _FUNC_EXPAND(manage_new_length)(_STRBUF_DATA_TYPE *str, size_t length)
EAPI void
_FUNC_EXPAND(free)(_STRBUF_STRUCT_NAME *buf)
{
if (!buf) return ;
EINA_MAGIC_CHECK_STRBUF(buf);
EINA_MAGIC_SET(buf, EINA_MAGIC_NONE);
eina_strbuf_common_free(buf);