mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 21:17:52 +00:00
Bug 242183 CreateNewStreamConv and NS_NewStreamConv are silly/leaky/...
r=darin sr=darin
This commit is contained in:
parent
a4d031090f
commit
8de46ebe80
@ -86,9 +86,6 @@ CreateNewStreamConv(nsISupports* aOuter, REFNSIID aIID, void **aResult)
|
||||
return rv;
|
||||
}
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
if (NS_FAILED(rv)) {
|
||||
*aResult = nsnull;
|
||||
}
|
||||
NS_RELEASE(inst); /* get rid of extra refcnt */
|
||||
return rv;
|
||||
}
|
||||
|
@ -696,5 +696,9 @@ NS_NewStreamConv(nsStreamConverterService** aStreamConv)
|
||||
if (!*aStreamConv) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*aStreamConv);
|
||||
return (*aStreamConv)->Init();
|
||||
nsresult rv = (*aStreamConv)->Init();
|
||||
if (NS_FAILED(rv))
|
||||
NS_RELEASE(*aStreamConv);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user