[net.sources.bugs] minor savenews bug

chuqui@nsc.UUCP (Chuq Von Rospach) (06/17/85)

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@decwrl.ARPA

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