Merge pull request #558 from diizy/fixclosecrash

Fix close on crash patch which was  posted on the mailing list by Filipe...
This commit is contained in:
Tobias Doerffel
2014-04-04 00:30:30 +02:00
20 changed files with 74 additions and 74 deletions

View File

@@ -70,7 +70,7 @@ seed()
extern "C" {
__attribute__ ((constructor))
void _init()
void caps_so_init()
{
DescriptorStub ** d = descriptors;
@@ -126,7 +126,7 @@ void _init()
}
__attribute__ ((destructor))
void _fini()
void caps_so_fini()
{
for (ulong i = 0; i < N; ++i)
delete descriptors[i];

View File

@@ -233,10 +233,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
int i;
char ** port_names;
@@ -341,9 +341,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -575,9 +575,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -349,10 +349,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
int i;
char ** port_names;
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -574,10 +574,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -717,9 +717,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -516,10 +516,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -646,9 +646,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -696,10 +696,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -857,9 +857,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -607,9 +607,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -494,7 +494,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
void
__attribute__((constructor)) _init() {
_init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
@@ -765,7 +765,7 @@ __attribute__((constructor)) _init() {
void
__attribute__((destructor)) _fini() {
_fini() {
if (eqDescriptor) {
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);

View File

@@ -596,7 +596,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
void
__attribute__((constructor)) _init() {
_init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
@@ -955,7 +955,7 @@ __attribute__((constructor)) _init() {
void
__attribute__((destructor)) _fini() {
_fini() {
if (eqDescriptor) {
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);

View File

@@ -324,10 +324,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -423,9 +423,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -225,10 +225,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -325,9 +325,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -418,10 +418,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
int i;
char ** port_names;
@@ -536,9 +536,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -378,10 +378,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
int i;
char ** port_names;
@@ -480,9 +480,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -665,10 +665,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -815,9 +815,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -624,10 +624,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
int i;
char ** port_names;
@@ -748,9 +748,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -228,10 +228,10 @@ cleanup_Sigmoid(LADSPA_Handle Instance) {
LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -318,9 +318,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -220,10 +220,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -323,9 +323,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -381,10 +381,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -308,10 +308,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* _init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
_init() {
int i;
char ** port_names;
@@ -425,9 +425,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* _fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
_fini() {
delete_descriptor(mono_descriptor);
}