PR_Free(cidString);
ClassIDWriter(PLDHashTable *table,               PLDHashEntryHdr *hdr,              PRUint32 number,               void *arg){    nsFactoryEntry *factoryEntry = ((nsFactoryTableEntry*)hdr)->mFactoryEntry;    PRFileDesc* fd = ((PersistentWriterArgs*)arg)->mFD;    nsLoaderdata *loaderData = ((PersistentWriterArgs*)arg)->mLoaderData;    if (factoryEntry->typeIndex < 0)        return PL_DHASH_NEXT;    char* cidString = factoryEntry->cid.ToString();    NS_ASSERTION(cidString, "null cidString!");    if (!cidString) return PL_DHASH_NEXT;    char *contractID = nsnull, *className = nsnull;    nsCOMPtr<nsIClassInfo> classInfo = do_QueryInterface(factoryEntry->factory);    if (classInfo)    {        classInfo->GetContractID(&contractID);        classInfo->GetClassDescription(&className);    }    const char * loaderName = nsnull;    if (factoryEntry->typeIndex)        loaderName = loaderData[factoryEntry->typeIndex].type;    char* location = factoryEntry->location;    // cid,contract_id,type,class_name,inproc_server    PR_fprintf(fd,               "%s,%s,%s,%s,%s\n",               cidString,               (contractID ? contractID : ""),               (loaderName ? loaderName : ""),               (className  ? className  : ""),                (location   ? location   : ""));     PR_Free(cidString);    if (contractID)        PR_Free(contractID);    if (className)        PR_Free(className);    return PL_DHASH_NEXT;}