char* cidString = factoryEntry->cid.ToString(); if (cidString) { PR_fprintf(fd, "%s,%s\n", contractID, cidString); PR_Free(cidString); }
char cidString[UID_STRING_LENGTH]; GetIDString(factoryEntry->cid, cidString); PR_fprintf(fd, "%s,%s\n", contractID, cidString);
ContractIDWriter(PLDHashTable *table,                  PLDHashEntryHdr *hdr,                 PRUint32 number,                  void *arg){    char *contractID   = ((nsContractIDTableEntry*)hdr)->mContractID;    nsFactoryEntry *factoryEntry = ((nsContractIDTableEntry*)hdr)->mFactoryEntry;    if (factoryEntry == kNonExistentContractID || factoryEntry->typeIndex < 0)        return PL_DHASH_NEXT;    PRFileDesc* fd = ((PersistentWriterArgs*)arg)->mFD;    char* cidString = factoryEntry->cid.ToString();    if (cidString) {        PR_fprintf(fd, "%s,%s\n", contractID, cidString); // what if this fails?        PR_Free(cidString);    }    return PL_DHASH_NEXT;}