Fix close on crash patch which was posted on the mailing list by Filipe Coelho
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user