diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-09 20:27:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-09 20:27:17 +0000 |
commit | 5461356b14332638353b7a4a94fb1d24b330043f (patch) | |
tree | aa636a85b697f86a914d5b734d03232a7e5deee9 /src/main/extractor_ipc_gnu.c | |
parent | 0aae6984db8fd561d11b89247455acbc1815c725 (diff) | |
download | libextractor-5461356b14332638353b7a4a94fb1d24b330043f.tar.gz libextractor-5461356b14332638353b7a4a94fb1d24b330043f.zip |
-trying to fix rare, random use-after-free if interacting with broken plugins
Diffstat (limited to 'src/main/extractor_ipc_gnu.c')
-rw-r--r-- | src/main/extractor_ipc_gnu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/extractor_ipc_gnu.c b/src/main/extractor_ipc_gnu.c index 9582bdc..3d9248c 100644 --- a/src/main/extractor_ipc_gnu.c +++ b/src/main/extractor_ipc_gnu.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "extractor_datasource.h" | 28 | #include "extractor_datasource.h" |
29 | #include "extractor_logging.h" | 29 | #include "extractor_logging.h" |
30 | #include "extractor_plugin_main.h" | 30 | #include "extractor_plugin_main.h" |
31 | #include "extractor_plugins.h" | ||
31 | #include "extractor_ipc.h" | 32 | #include "extractor_ipc.h" |
32 | #include <dirent.h> | 33 | #include <dirent.h> |
33 | #include <sys/types.h> | 34 | #include <sys/types.h> |
@@ -372,6 +373,8 @@ EXTRACTOR_IPC_channel_destroy_ (struct EXTRACTOR_Channel *channel) | |||
372 | LOG_STRERROR ("close"); | 373 | LOG_STRERROR ("close"); |
373 | if (0 != close (channel->cpipe_in)) | 374 | if (0 != close (channel->cpipe_in)) |
374 | LOG_STRERROR ("close"); | 375 | LOG_STRERROR ("close"); |
376 | if (NULL != channel->plugin) | ||
377 | channel->plugin->channel = NULL; | ||
375 | free (channel->mdata); | 378 | free (channel->mdata); |
376 | free (channel); | 379 | free (channel); |
377 | } | 380 | } |