view VBoxFrontend/MonoCOMInteropDoubleFree.patch @ 3:b0033e69105a

Set group ID during initialization, added a patch to mono to fix a double free 'bug'
author Ivo Smits
date Wed, 04 May 2011 16:32:10 +0200
parents
children
line wrap: on
line source

???diff --git a/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs b/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs
index 54fefe2..1271257 100644
--- a/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs
+++ b/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs
@@ -93,12 +93,9 @@ namespace Mono.Interop
                        Marshal.ThrowExceptionForHR (hr);
                        ComInteropProxy obj = FindProxy (ppv);
                        if (obj == null) {
-                               Marshal.Release (pItf);
                                return new ComInteropProxy (ppv);
                        }
                        else {
-                               Marshal.Release (pItf);
-                               System.Threading.Interlocked.Increment (ref obj.ref_count);
                                return obj;
                        }
                }