mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1496588: Avoid a UB in mozStorageService.cpp. r=froydnj
This commit is contained in:
parent
4cfa7dac99
commit
5e2560e587
@ -619,8 +619,10 @@ Service::OpenAsyncDatabase(nsIVariant *aDatabaseStore,
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
rv = storageFile->Clone(getter_AddRefs(storageFile));
|
||||
nsCOMPtr<nsIFile> cloned;
|
||||
rv = storageFile->Clone(getter_AddRefs(cloned));
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
storageFile = cloned.forget();
|
||||
|
||||
if (!readOnly) {
|
||||
// Ensure that SQLITE_OPEN_CREATE is passed in for compatibility reasons.
|
||||
|
Loading…
Reference in New Issue
Block a user