b427aa1 Bug 702150 - Resouce leaks in htmladmin.c

Authored and Committed by nkinder 13 years ago
    Bug 702150 - Resouce leaks in htmladmin.c
    
    There are a number of places where htmladmin_strdup_escaped() is
    called without saving the returned pointer.  This doesn't allow us
    to ever free the returned string.  These areas have been changed to
    save and free the returned value.  Most of these places were using
    malloc() and then sprintf().  I have changed all of these to use
    PR_smprintf() to prevent errors in allocating the wrong amount of
    memory.
    
    The start_server() and stop_server() functions also allocated a few
    strings without freeing them when finished.  I added bail sections
    at the end of these functions that free the memory.
    
    A few functions were leaking dynamic arrays.  I added deep frees of
    the arrays and their elements prior to exiting the functions.
    
    cov#10829,10828,10827,10826,10825,10824
    
        
file modified
+190 -260