minor savenews bug

Chuq Von Rospach chuqui at nsc.UUCP
Tue Jun 18 02:36:17 AEST 1985


It has been pointed out that there is a minor bug in my savenews
news archiver. In the function pop_dir, I accidently switched two
lines and was setting a pointer to NULL before I was freeing the pointer.
On some systems this will cause a segmentation fault, at best you simply
never recover your malloc()ed memory. The two lines should be:

     free(dirstack[lastdir]);
     dirstack[lastdir] = NULL;

instead of the other way around.

chuq
-- 
:From the misfiring synapses of:                  Chuq Von Rospach
{cbosgd,fortune,hplabs,ihnp4,seismo}!nsc!chuqui   nsc!chuqui at decwrl.ARPA

The offices were very nice, and the clients were only raping the land, and
then, of course, there was the money...



More information about the Comp.sources.bugs mailing list