mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
remove debug-code which zero-filled some structures before free()ing them
This commit is contained in:
parent
035a2e5479
commit
6bd91936ff
@ -44,7 +44,6 @@ hash_element_dtor(void *user, void *element)
|
|||||||
|
|
||||||
h->dtor(e->ptr);
|
h->dtor(e->ptr);
|
||||||
|
|
||||||
memset(e, 0, sizeof(struct curl_hash_element));
|
|
||||||
free(e);
|
free(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,7 +271,6 @@ Curl_hash_destroy(struct curl_hash *h)
|
|||||||
|
|
||||||
Curl_hash_clean(h);
|
Curl_hash_clean(h);
|
||||||
|
|
||||||
memset(h, 0, sizeof(struct curl_hash));
|
|
||||||
free(h);
|
free(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
|
|||||||
|
|
||||||
list->dtor(user, e->ptr);
|
list->dtor(user, e->ptr);
|
||||||
|
|
||||||
memset(e, 0, sizeof(struct curl_llist_element));
|
|
||||||
free(e);
|
free(e);
|
||||||
--list->size;
|
--list->size;
|
||||||
|
|
||||||
@ -128,7 +127,6 @@ Curl_llist_destroy(struct curl_llist *list, void *user)
|
|||||||
while(list->size > 0)
|
while(list->size > 0)
|
||||||
Curl_llist_remove(list, list->tail, user);
|
Curl_llist_remove(list, list->tail, user);
|
||||||
|
|
||||||
memset(list, 0, sizeof(struct curl_llist));
|
|
||||||
free(list);
|
free(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user