1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

avoid double frees()

This commit is contained in:
Steffen Vogel 2017-03-06 13:27:40 -04:00
parent 429c07f1e3
commit f1294fdffd
2 changed files with 5 additions and 3 deletions

View file

@ -157,7 +157,6 @@ int node_destroy(struct node *n)
free(n->_vd);
free(n->_name);
free(n);
return 0;
}

View file

@ -208,8 +208,11 @@ int path_destroy(struct path *p)
path_source_destroy(p->source);
free(p->_name);
free(p->source);
if (p->_name)
free(p->_name);
if (p->source)
free(p->source);
p->state = PATH_DESTROYED;