intel / dleyna-server

dleyna-server is a library for implementing services that allow clients to discover, browse and manipulate Digital Media Servers. An implementation of such a service for linux is also included.
https://01.org/dleyna/
GNU Lesser General Public License v2.1
28 stars 28 forks source link

Fix possible use-after-free on exit #151

Closed debarshiray closed 8 years ago

debarshiray commented 8 years ago

When the last client of dleyna-server exits, and dleyna-server tries to exit, it might use the "upnp" pointer after it was freed as we receive a signal where the user_data is invalid. Avoid that by zero'ing freed pointers and disconnecting from the signal for which "upnp" is user_data.

See https://retrace.fedoraproject.org/faf/reports/855440/

rsbells commented 8 years ago

Yes - I agree this is good fix...