Crash on close due to free of not allocated pointer
When closing VLC, I sometimes get a crash due to freeing an unallocated pointer:
vlc-osx-static(10517,0x7fffc13203c0) malloc: *** error for object 0x11a337e00: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Process 10517 stopped
* thread [#1](https://code.videolan.org/videolan/vlc/-/issues/1), queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame [#0](https://code.videolan.org/videolan/vlc/-/issues/0): 0x00007fffb85a015f libsystem_malloc.dylib`malloc_error_break
libsystem_malloc.dylib`malloc_error_break:
-> 0x7fffb85a015f <+0>: pushq %rbp
0x7fffb85a0160 <+1>: movq %rsp, %rbp
0x7fffb85a0163 <+4>: nop
0x7fffb85a0164 <+5>: nopl (%rax)
(lldb) bt
* thread [#1](https://code.videolan.org/videolan/vlc/-/issues/1), queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame [#0](https://code.videolan.org/videolan/vlc/-/issues/0): 0x00007fffb85a015f libsystem_malloc.dylib`malloc_error_break
frame [#1](https://code.videolan.org/videolan/vlc/-/issues/1): 0x00007fffb8591f6e libsystem_malloc.dylib`free + 409
frame [#2](https://code.videolan.org/videolan/vlc/-/issues/2): 0x00000001000fe38d libvlccore.dylib`input_item_Release(p_item=0x0000000100554710) at item.c:513 [opt]
frame [#3](https://code.videolan.org/videolan/vlc/-/issues/3): 0x00000001000fbf1f libvlccore.dylib`playlist_ItemRelease(p_playlist=0x000000010054b978, p_item=0x0000000100556120) at item.c:362 [opt]
frame [#4](https://code.videolan.org/videolan/vlc/-/issues/4): 0x00000001000fb283 libvlccore.dylib`playlist_NodeDeleteExplicit(p_playlist=0x000000010054b978, p_root=0x000000010054d3d0, flags=1) at tree.c:110 [opt]
frame [#5](https://code.videolan.org/videolan/vlc/-/issues/5): 0x00000001000f8193 libvlccore.dylib`playlist_Destroy(p_playlist=0x000000010054b978) at engine.c:333 [opt]
frame [#6](https://code.videolan.org/videolan/vlc/-/issues/6): 0x00000001000dab45 libvlccore.dylib`libvlc_InternalCleanup(p_libvlc=0x0000000100508078) at libvlc.c:515 [opt]
frame [#7](https://code.videolan.org/videolan/vlc/-/issues/7): 0x00000001000afe46 libvlc.dylib`libvlc_release(p_instance=0x0000000100510900) at core.c:104 [opt]
frame [#8](https://code.videolan.org/videolan/vlc/-/issues/8): 0x000000010000462e vlc-osx-static`main(i_argc=3, ppsz_argv=<unavailable>) at darwinvlc.m:320 [opt]
frame [#9](https://code.videolan.org/videolan/vlc/-/issues/9): 0x0000000100003fd4 vlc-osx-static`start + 52