chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.81k stars 1.2k forks source link

Prevent new_registration leak on error paths #1283

Open gjasny opened 1 year ago

gjasny commented 1 year ago

Since 50ad5e47793521a213eb461da701e8ddd3d5c70d the new_registration is leaked in the error paths. Maybe the allocation of new_registration could be moved closer to the usage, instead.