Bug 388569 - Memory leaks when calling nsVariant::GetAsInterface. r=benjamin

--HG--
extra : rebase_source : 4bcffd36a6fa65c9b4dbefff4bc810254c2a222c
This commit is contained in:
Josh Matthews 2010-05-04 00:39:26 -04:00
parent 0407707bdc
commit 1ce131d32a

View File

@ -1253,6 +1253,8 @@ nsCanvasRenderingContext2D::SetStrokeStyle(nsIVariant *aValue)
nsCOMPtr<nsISupports> sup;
rv = aValue->GetAsInterface(&iid, getter_AddRefs(sup));
NS_ENSURE_SUCCESS(rv, rv);
if (iid)
NS_Free(iid);
str.SetIsVoid(PR_TRUE);
return SetStrokeStyle_multi(str, sup);