|
|
@ -240,7 +240,7 @@ internal_load_library(const char *libname) |
|
|
|
if (file_scanner->handle == NULL) |
|
|
|
if (file_scanner->handle == NULL) |
|
|
|
{ |
|
|
|
{ |
|
|
|
load_error = dlerror(); |
|
|
|
load_error = dlerror(); |
|
|
|
free((char *) file_scanner); |
|
|
|
free(file_scanner); |
|
|
|
/* errcode_for_file_access might not be appropriate here? */ |
|
|
|
/* errcode_for_file_access might not be appropriate here? */ |
|
|
|
ereport(ERROR, |
|
|
|
ereport(ERROR, |
|
|
|
(errcode_for_file_access(), |
|
|
|
(errcode_for_file_access(), |
|
|
@ -263,7 +263,7 @@ internal_load_library(const char *libname) |
|
|
|
|
|
|
|
|
|
|
|
/* try to close library */ |
|
|
|
/* try to close library */ |
|
|
|
dlclose(file_scanner->handle); |
|
|
|
dlclose(file_scanner->handle); |
|
|
|
free((char *) file_scanner); |
|
|
|
free(file_scanner); |
|
|
|
|
|
|
|
|
|
|
|
/* issue suitable complaint */ |
|
|
|
/* issue suitable complaint */ |
|
|
|
incompatible_module_error(libname, &module_magic_data); |
|
|
|
incompatible_module_error(libname, &module_magic_data); |
|
|
@ -273,7 +273,7 @@ internal_load_library(const char *libname) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/* try to close library */ |
|
|
|
/* try to close library */ |
|
|
|
dlclose(file_scanner->handle); |
|
|
|
dlclose(file_scanner->handle); |
|
|
|
free((char *) file_scanner); |
|
|
|
free(file_scanner); |
|
|
|
/* complain */ |
|
|
|
/* complain */ |
|
|
|
ereport(ERROR, |
|
|
|
ereport(ERROR, |
|
|
|
(errmsg("incompatible library \"%s\": missing magic block", |
|
|
|
(errmsg("incompatible library \"%s\": missing magic block", |
|
|
|