Fixed: spinlock_release is before free
Fixed: spinlock_release is before free
This commit is contained in:
parent
67c9f30632
commit
8d5ca11374
@ -596,9 +596,14 @@ blr_close_binlog(ROUTER_INSTANCE *router, BLFILE *file)
|
||||
close(file->fd);
|
||||
file->fd = -1;
|
||||
}
|
||||
spinlock_release(&file->lock);
|
||||
if (file->refcnt == 0)
|
||||
|
||||
if (file->refcnt == 0) {
|
||||
spinlock_release(&file->lock);
|
||||
|
||||
free(file);
|
||||
} else {
|
||||
spinlock_release(&file->lock);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user