fix[kmpp_buffer]: Close fd when deinit

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie12c20ecaa6d2b090d257e8fe1ba8f578da4a054
This commit is contained in:
Yandong Lin
2025-08-12 14:29:56 +08:00
parent 317fce0bee
commit 0ce028aaa9

View File

@@ -188,6 +188,11 @@ rk_s32 kmpp_buffer_impl_deinit(void *entry, KmppObj obj, const char *caller)
return rk_nok; return rk_nok;
} }
if (priv->impl->fd > 0) {
close(priv->impl->fd);
priv->impl->fd = -1;
}
if (priv->obj) { if (priv->obj) {
kmpp_obj_impl_put(priv->obj, caller); kmpp_obj_impl_put(priv->obj, caller);
priv->obj = NULL; priv->obj = NULL;