commit e209dc91939e8b21e51ffef8090c9ea0612a10ec
parent d29628fad35c5c416fdba30864a63931deb204c1
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 14 Aug 2010 20:09:56 +0000
fix leak on error
Diffstat:
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/main/extractor.c b/src/main/extractor.c
@@ -1783,21 +1783,30 @@ extract (struct EXTRACTOR_PluginList *plugins,
if (0 != extract_oop (ppos, fn,
(tptr != NULL) ? tfn : NULL,
proc, proc_cls))
- return;
+ {
+ ppos = NULL;
+ break;
+ }
if (ppos->cpid == -1)
{
start_process (ppos);
if (0 != extract_oop (ppos, fn,
(tptr != NULL) ? tfn : NULL,
proc, proc_cls))
- return;
+ {
+ ppos = NULL;
+ break;
+ }
}
break;
case EXTRACTOR_OPTION_OUT_OF_PROCESS_NO_RESTART:
if (0 != extract_oop (ppos, fn,
(tptr != NULL) ? tfn : NULL,
proc, proc_cls))
- return;
+ {
+ ppos = NULL;
+ break;
+ }
break;
case EXTRACTOR_OPTION_IN_PROCESS:
want_tail = ( (ppos->specials != NULL) &&
@@ -1818,7 +1827,10 @@ extract (struct EXTRACTOR_PluginList *plugins,
proc,
proc_cls,
ppos->plugin_options)) )
- return;
+ {
+ ppos = NULL;
+ break;
+ }
}
else
{
@@ -1828,7 +1840,10 @@ extract (struct EXTRACTOR_PluginList *plugins,
proc,
proc_cls,
ppos->plugin_options)) )
- return;
+ {
+ ppos = NULL;
+ break;
+ }
}
}
break;