Skip to content
Commit df29455d authored by Dan Fandrich's avatar Dan Fandrich
Browse files

asyn-thread: Fixed cleanup after OOM

destroy_async_data() assumes that if the flag "done" is not set yet, the
thread itself will clean up once the request is complete.  But if an
error (generally OOM) occurs before the thread even has a chance to
start, it will never get a chance to clean up and memory will be leaked.
By clearing "done" only just before starting the thread, the correct
cleanup sequence will happen in all cases.
parent edcb1ef6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment