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:
parent
429c07f1e3
commit
f1294fdffd
2 changed files with 5 additions and 3 deletions
|
@ -157,7 +157,6 @@ int node_destroy(struct node *n)
|
|||
|
||||
free(n->_vd);
|
||||
free(n->_name);
|
||||
free(n);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue