mirror of https://github.com/rusefi/ChibiOS.git
Fixed a leak.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15234 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
10189b4178
commit
9c750d6aeb
|
@ -155,7 +155,7 @@ static msg_t drv_open_dir(void *instance,
|
|||
could fail, in that case the pointer stays at NULL.*/
|
||||
if (drvp->overlaid_drv != NULL) {
|
||||
(void) drvp->overlaid_drv->vmt->open_dir((void *)drvp->overlaid_drv,
|
||||
"/",
|
||||
drvp->path_prefix == NULL ? "/" : drvp->path_prefix,
|
||||
&odnp->overlaid_root);
|
||||
}
|
||||
|
||||
|
@ -269,6 +269,10 @@ static void node_dir_release(void *instance) {
|
|||
__referenced_object_release_impl(instance);
|
||||
if (__referenced_object_getref_impl(instance) == 0U) {
|
||||
|
||||
if (odnp->overlaid_root != NULL) {
|
||||
odnp->overlaid_root->vmt->release((void *)odnp->overlaid_root);
|
||||
}
|
||||
|
||||
chPoolFree(&vfs_overlay_driver_static.dir_nodes_pool, (void *)odnp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue