Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexter_cleanup fix #3

Closed
rncbc opened this issue Jun 7, 2014 · 0 comments
Closed

hexter_cleanup fix #3

rncbc opened this issue Jun 7, 2014 · 0 comments

Comments

@rncbc
Copy link
Contributor

rncbc commented Jun 7, 2014

below a simple diff-patch to hexter.c/hexter_cleanup() which fixes DSSI multi-instance removal from crashing eg. qtractor.

+++ a/src/hexter.c  2012-10-23 07:40:41.000000000 +0100
--- b/src/hexter.c  2014-06-06 19:00:00.000000000 +0100
@@ -242,7 +242,6 @@ hexter_cleanup(LADSPA_Handle handle)
         hexter_deactivate(instance);

         if (instance->patches) free(instance->patches);
-        free(instance);

         prev = NULL;
         for (inst = hexter_synth.instances; inst; inst = inst->next) {
@@ -256,6 +256,7 @@ hexter_cleanup(LADSPA_Handle handle)
             prev = inst;
         }
         hexter_synth.instance_count--;
+        free(instance);
     }

     if (!hexter_synth.instance_count && hexter_synth.initialized) {
smbolton added a commit that referenced this issue Jun 10, 2014
hexter_cleanup fix #3 -- use after free()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant