nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

drivers/video: Update unlink() and video_uninitialize() operation

Open SPRESENSE opened this issue 2 years ago • 2 comments

Summary

Add unregister_driver() execution to unlink() operation to delete device file. Also, add resource cleanup to video_uninitialize() operation to avoid memory leak without unlink() execution for compatibility.

Impact

drivers/video

Testing

Tested with spresense

SPRESENSE avatar Oct 24 '23 05:10 SPRESENSE

@xiaoxiang781216 Yes, it's as you say. video_unregister() should free resource, and video_uninitialize()/video_unlink() might be necessary to call video_unregister.

SPRESENSE avatar Dec 08 '23 03:12 SPRESENSE

@xiaoxiang781216 Yes, it's as you say. video_unregister() should free resource, and video_uninitialize()/video_unlink() might be necessary to call video_unregister.

so we should move the change to video_unregister.

xiaoxiang781216 avatar Dec 08 '23 05:12 xiaoxiang781216

@xiaoxiang781216 I moved resource release from video_uninitialize() to video_unregister().

SPRESENSE avatar Mar 08 '24 03:03 SPRESENSE

@xiaoxiang781216 @Donny9 Thank you for information. I verified that work well with #11892 without my change. I withdraw this PR.

SPRESENSE avatar Mar 12 '24 02:03 SPRESENSE

Ok, let me close this pr.

xiaoxiang781216 avatar Mar 12 '24 11:03 xiaoxiang781216