aiekick/ImGuiFileDialog

`IGFD_GetSelection` allocates with `strncpy` but `IGFD_Selection_Pair_DestroyContent` deallocates with `delete[]`

Closed this issue · 2 comments

Hi,

it seems that in C API IGFD_Selection_Pair_DestroyContent deallocates fileName and filePathName
with delete[]. But I believe they should be deallocated with free because they are allocated in IGFD_GetSelection
with strncpy which uses malloc.

Hello,

Are you sure ?

for me, 'strncpy' just move from a source to a target. there is no malloc in its.

But, the 'new' is just one line on top of the strncpy.

radekm commented

Hello, I'm wrong. I don't know what I was doing when I wrote this. Now when I look at it everything seems ok. Sorry