aboutsummaryrefslogtreecommitdiff
path: root/src/main/extractor_ipc_gnu.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-09 20:27:17 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-09 20:27:17 +0000
commit5461356b14332638353b7a4a94fb1d24b330043f (patch)
treeaa636a85b697f86a914d5b734d03232a7e5deee9 /src/main/extractor_ipc_gnu.c
parent0aae6984db8fd561d11b89247455acbc1815c725 (diff)
downloadlibextractor-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.c3
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}