Skip to content
Snippets Groups Projects
Commit e957881f authored by Steve Lhomme's avatar Steve Lhomme
Browse files

memstream: reset ptr on vlc_memstream_close() error

It's easier to spot of NULL pointer dereference than a use after free.

In the POSIX implementation [1] the status of the pointer is undefined on
error. In our implementation it's free'd.

In both cases it's better some to use that pointer value after exiting
vlc_memstream_close().

[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/open_memstream.html
parent 2746c42e
No related branches found
No related tags found
Loading
Pipeline #410650 passed with stage
in 18 minutes and 5 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment