graphics/nxterm: Avoid accessing freed memory
Fix accessing freed priv data.
This commit is contained in:
parent
8dd5d0d510
commit
46a92aeebb
@ -166,7 +166,9 @@ static int nxterm_close(FAR struct file *filep)
|
||||
{
|
||||
/* Yes.. Unregister the terminal device */
|
||||
|
||||
nxterm_sempost(priv);
|
||||
nxterm_unregister(priv);
|
||||
return OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -346,7 +348,9 @@ static int nxterm_unlink(FAR struct inode *inode)
|
||||
{
|
||||
/* No.. Unregister the terminal device now */
|
||||
|
||||
nxterm_sempost(priv);
|
||||
nxterm_unregister(priv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
nxterm_sempost(priv);
|
||||
|
Loading…
Reference in New Issue
Block a user