multiple calls to the request termination function cause crash

  I have a C++ class that encapsulates the HTML parser (well, more or less
showtext.c). The thing is, the first time the parser gets called, everything
works fine (a new request get generates, and properly deleted in the termination
function).  However, the 2nd and consequent times it is called, my request
termination function gets called twice. The first time it properly deletes the
request object. The 2nd time it passes in the same request pointer, which of
course now points to garbage, and consequently crashes in HTRequest_delete()
(specifically when it tries to free orig_output_stream).

Does anyone know why the termination function is getting called twice?
Also, this problem looks similar to the problem Will Sargent had last year (msg
#1503,1505 in the archive), but there were no real answer to his problem.
Currently, I have a workaround to ignore the pointer when it comes around the
2nd time, but I prefer a more permanent solution.

Any help would be greatly appreciated..
-Jonah

Received on Thursday, 8 June 2000 16:36:51 UTC