[xpcom] Fix ref leak with dict retrieval
authorKalle Vahlman <kalle.vahlman@movial.com>
Thu, 30 Apr 2009 07:47:25 +0000 (10:47 +0300)
committerKalle Vahlman <kalle.vahlman@movial.com>
Thu, 30 Apr 2009 07:47:25 +0000 (10:47 +0300)
xpcom-dbusservice/DBusMarshaling.cpp

index ce16c96be8d102d7b3438fcb6cf7927be0c81239..554b4c621a922cb8cb1f2f176d920f60b6564fca 100644 (file)
@@ -1277,6 +1277,7 @@ already_AddRefed<nsIWritableVariant> getVariantFromIter(JSContext* cx, DBusMessa
                 if(NS_FAILED(rv))
                     return nsnull;
                 variant->SetFromVariant(var);
+                NS_RELEASE(var);
                 var = nsnull;
                 NS_ADDREF(retval = variant);