projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6d8a91
)
eina: make eina_binbuf_free and eina_strbuff_free accept NULL.
author
Cedric BAIL
<cedric.bail@samsung.com>
Thu, 2 Jan 2014 03:11:38 +0000
(12:11 +0900)
committer
Cedric BAIL
<cedric.bail@samsung.com>
Thu, 2 Jan 2014 07:23:46 +0000
(16:23 +0900)
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.
src/lib/eina/eina_binbuf_template_c.x
patch
|
blob
|
history
diff --git
a/src/lib/eina/eina_binbuf_template_c.x
b/src/lib/eina/eina_binbuf_template_c.x
index
7e0c539
..
3dfae42
100644
(file)
--- a/
src/lib/eina/eina_binbuf_template_c.x
+++ b/
src/lib/eina/eina_binbuf_template_c.x
@@
-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);