projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
remove internal usage of redundant uci_ptr.last
[project/uci.git]
/
util.c
diff --git
a/util.c
b/util.c
index 8572e8130555c7aff49e8e8b578841b6ef387825..61e42cd3b061c5e17f9950339e815ebbac96b68d 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-36,10
+36,9
@@
__private void *uci_malloc(struct uci_context *ctx, size_t size)
{
void *ptr;
- ptr =
malloc(
size);
+ ptr =
calloc(1,
size);
if (!ptr)
UCI_THROW(ctx, UCI_ERR_MEM);
- memset(ptr, 0, size);
return ptr;
}