Do not use just freed memory.

Sponsored by:	Nginx, Inc.
This commit is contained in:
Gleb Smirnoff 2013-11-11 07:44:09 +00:00
parent 555036b5f6
commit d2201d13a7

View File

@ -323,9 +323,9 @@ parse_fingerprint(yaml_document_t *doc, yaml_node_t *node)
static void
free_fingerprint_list(struct fingerprint_list* list)
{
struct fingerprint* fingerprint;
struct fingerprint *fingerprint, *tmp;
STAILQ_FOREACH(fingerprint, list, next) {
STAILQ_FOREACH_SAFE(fingerprint, list, next, tmp) {
if (fingerprint->name)
free(fingerprint->name);
free(fingerprint);