diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-07-30 13:06:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-07-30 13:06:01 +0000 |
commit | ecff3e563688a7736b19d2ef72db598a34eee0d0 (patch) | |
tree | afe5975dabb9b61dadc83dd4173e120d33e82092 | |
parent | 2399e68f28366c91a3d7093bb2c81c7d5818513f (diff) | |
download | libextractor-ecff3e563688a7736b19d2ef72db598a34eee0d0.tar.gz libextractor-ecff3e563688a7736b19d2ef72db598a34eee0d0.zip |
add reference counting for shm and destroy them when they are finished
-rw-r--r-- | src/main/extractor_plugins.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/extractor_plugins.c b/src/main/extractor_plugins.c index 9519298..5b0f20d 100644 --- a/src/main/extractor_plugins.c +++ b/src/main/extractor_plugins.c | |||
@@ -381,7 +381,8 @@ EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, | |||
381 | prev->next = pos->next; | 381 | prev->next = pos->next; |
382 | if (NULL != pos->channel) | 382 | if (NULL != pos->channel) |
383 | EXTRACTOR_IPC_channel_destroy_ (pos->channel); | 383 | EXTRACTOR_IPC_channel_destroy_ (pos->channel); |
384 | if (0 == EXTRACTOR_IPC_shared_memory_change_rc_ (pos->shm, -1)) | 384 | if ( (NULL != pos->shm) && |
385 | (0 == EXTRACTOR_IPC_shared_memory_change_rc_ (pos->shm, -1)) ) | ||
385 | EXTRACTOR_IPC_shared_memory_destroy_ (pos->shm); | 386 | EXTRACTOR_IPC_shared_memory_destroy_ (pos->shm); |
386 | free (pos->short_libname); | 387 | free (pos->short_libname); |
387 | free (pos->libname); | 388 | free (pos->libname); |