projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix potential NULL pointer dereferences.
[tinc]
/
src
/
list.c
diff --git
a/src/list.c
b/src/list.c
index
2dd414a
..
e2eeabc
100644
(file)
--- a/
src/list.c
+++ b/
src/list.c
@@
-26,7
+26,7
@@
/* (De)constructors */
list_t *list_alloc(list_action_t delete) {
/* (De)constructors */
list_t *list_alloc(list_action_t delete) {
- list_t *list = x
malloc_and_zero
(sizeof(list_t));
+ list_t *list = x
zalloc
(sizeof(list_t));
list->delete = delete;
return list;
list->delete = delete;
return list;
@@
-37,7
+37,7
@@
void list_free(list_t *list) {
}
list_node_t *list_alloc_node(void) {
}
list_node_t *list_alloc_node(void) {
- return x
malloc_and_zero
(sizeof(list_node_t));
+ return x
zalloc
(sizeof(list_node_t));
}
void list_free_node(list_t *list, list_node_t *node) {
}
void list_free_node(list_t *list, list_node_t *node) {