if (NS_FAILED(res)) { NS_RELEASE(*aResult); }
if (NS_FAILED(res)) NS_RELEASE(*aResult);
nsresult nsCharsetMenu::NewRDFContainer(nsIRDFDataSource * aDataSource,                                         nsIRDFResource * aResource,                                         nsIRDFContainer ** aResult){  nsresult res;  res = nsComponentManager::CreateInstance(kRDFContainerCID, NULL,       nsIRDFContainer::GetIID(), (void**)aResult);  if (NS_FAILED(res)) return res;  res = (*aResult)->Init(aDataSource, aResource);  if (NS_FAILED(res)) {    NS_RELEASE(*aResult);  }  return res;}