On Thu, Nov 21, 2013 at 05:15:08PM -0500, Justin Piszcz wrote: > lftp crashes when I run cls -l: > > *** Error in `lftp': double free or corruption (!prev): 0x0000000001149700
I still could not reproduce the problem. But please try this patch and report if it makes any difference. -- Alexander.
diff --git a/src/OutputJob.cc b/src/OutputJob.cc index fc09524..ebaa090 100644 --- a/src/OutputJob.cc +++ b/src/OutputJob.cc @@ -228,7 +228,7 @@ OutputJob::OutputJob(const char *path, const char *a0, FileAccess *fa0) Init(a0); } -OutputJob::~OutputJob() +void OutputJob::PrepareToDie() { Bg(); AcceptSig(SIGTERM); @@ -236,6 +236,10 @@ OutputJob::~OutputJob() Delete(input); if(input != output) Delete(output); + input=0; + output=0; + + super::PrepareToDie(); } /* This is called to ask us "permission" to display a status line. */ diff --git a/src/OutputJob.h b/src/OutputJob.h index f925b01..99e3292 100644 --- a/src/OutputJob.h +++ b/src/OutputJob.h @@ -71,7 +71,7 @@ class OutputJob : public Job public: OutputJob(FDStream *output, const char *a0); OutputJob(const char *path, const char *a0, FA *fa=0); - ~OutputJob(); + void PrepareToDie(); /* Set the main filter: */ void SetFilter(const char *f) { filter.set(f); }
_______________________________________________ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp