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

file: fix assertion raised in file_destroy() when node was never started (closes #186)

This commit is contained in:
Steffen Vogel 2018-07-26 16:38:26 +02:00
parent 634beee1d1
commit f6c91f4ac9

View file

@ -263,20 +263,12 @@ int file_stop(struct node *n)
if (ret)
return ret;
free(f->uri);
return 0;
}
int file_destroy(struct node *n)
{
int ret;
struct file *f = (struct file *) n->_vd;
ret = io_destroy(&f->io);
if (ret)
return ret;
free(f->uri);
return 0;
}
@ -383,7 +375,6 @@ static struct plugin p = {
.print = file_print,
.start = file_start,
.stop = file_stop,
.destroy = file_destroy,
.read = file_read,
.write = file_write,
.fd = file_fd