diff options
Diffstat (limited to 'src/main/extractor_plugins.c')
-rw-r--r-- | src/main/extractor_plugins.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/main/extractor_plugins.c b/src/main/extractor_plugins.c index edefc47..9a16a33 100644 --- a/src/main/extractor_plugins.c +++ b/src/main/extractor_plugins.c | |||
@@ -89,7 +89,7 @@ get_symbol_with_prefix (void *lib_handle, | |||
89 | lt_dlerror()); | 89 | lt_dlerror()); |
90 | } | 90 | } |
91 | if (NULL != first_error) | 91 | if (NULL != first_error) |
92 | free(first_error); | 92 | free (first_error); |
93 | #endif | 93 | #endif |
94 | } | 94 | } |
95 | 95 | ||
@@ -158,11 +158,11 @@ EXTRACTOR_plugin_load_ (struct EXTRACTOR_PluginList *plugin) | |||
158 | "Loading `%s' plugin failed: %s\n", | 158 | "Loading `%s' plugin failed: %s\n", |
159 | plugin->short_libname, | 159 | plugin->short_libname, |
160 | "can't convert plugin name to local encoding"); | 160 | "can't convert plugin name to local encoding"); |
161 | #endif | ||
161 | free (plugin->libname); | 162 | free (plugin->libname); |
162 | plugin->libname = NULL; | 163 | plugin->libname = NULL; |
163 | plugin->flags = EXTRACTOR_OPTION_DISABLED; | 164 | plugin->flags = EXTRACTOR_OPTION_DISABLED; |
164 | return -1; | 165 | return -1; |
165 | #endif | ||
166 | } | 166 | } |
167 | plugin->libraryHandle = lt_dlopenadvise (llibname, | 167 | plugin->libraryHandle = lt_dlopenadvise (llibname, |
168 | advise); | 168 | advise); |
@@ -249,20 +249,6 @@ EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList *prev, | |||
249 | result->plugin_options = strdup (options); | 249 | result->plugin_options = strdup (options); |
250 | else | 250 | else |
251 | result->plugin_options = NULL; | 251 | result->plugin_options = NULL; |
252 | /* This is kinda weird, but it allows us to not to call GetSystemInfo() | ||
253 | * or sysconf() every time we need allocation granularity - just once | ||
254 | * for each plugin. | ||
255 | * The only alternative is to keep it in a global variable... | ||
256 | */ | ||
257 | #if WINDOWS | ||
258 | { | ||
259 | SYSTEM_INFO si; | ||
260 | GetSystemInfo (&si); | ||
261 | result->allocation_granularity = si.dwAllocationGranularity; | ||
262 | } | ||
263 | #else | ||
264 | result->allocation_granularity = sysconf (_SC_PAGE_SIZE); | ||
265 | #endif | ||
266 | return result; | 252 | return result; |
267 | } | 253 | } |
268 | 254 | ||