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:
parent
634beee1d1
commit
f6c91f4ac9
1 changed files with 2 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue