linux-fusion
linux-fusion copied to clipboard
ref: Cleanup/prevent dangling throws
fusion_ref_throw() stores Throw entries in FusionRef. These entries are normally removed by matching fusion_ref_catch() calls.
This doesn't happen if the catcher fusionee never calls fusion_ref_catch(), e.g. it exits unexpectedly.
Similar situation happens if the catcher fusionee exits just before the throw call.
These dangling throws can cause resource leaks (e.g. video memory).
To fix this issue this change will:
- Remove throws when their catcher fusionee are being destroyed.
- Prevent fusion_ref_throw() to add new throws if the catcher fusionee does not exist.
Signed-off-by: Tamas Koloti [email protected]