PL_HashTableRemove(mNamedDataSources, uri); }
NS_ASSERTION(*hep != nsnull, "datasource was never registered"); if (! *hep) return NS_ERROR_ILLEGAL_VALUE;  PL_strfree((char*) (*hep)->key);    PL_HashTableRawRemove(mNamedDataSources, hep, *hep);
ServiceImpl::UnregisterDataSource(nsIRDFDataSource* aDataSource){    NS_PRECONDITION(aDataSource != nsnull, "null ptr");    if (! aDataSource)        return NS_ERROR_NULL_POINTER;    nsresult rv;    nsXPIDLCString uri;    rv = aDataSource->GetURI(getter_Copies(uri));    if (NS_FAILED(rv)) return rv;    if (uri) {        nsIRDFDataSource* ds =            NS_STATIC_CAST(nsIRDFDataSource*, PL_HashTableLookup(mNamedDataSources, uri));        if (! ds)            return NS_ERROR_ILLEGAL_VALUE;        // XXXwaterson LEAK! remember to free the key        PL_HashTableRemove(mNamedDataSources, uri);    }    return NS_OK;}