Sync to trunk r39350.
[reactos.git] / reactos / drivers / network / afd / afd / main.c
index 3e968a4..0c7e5f8 100644 (file)
@@ -30,7 +30,7 @@ void OskitDumpBuffer( PCHAR Data, UINT Len ) {
 
     for( i = 0; i < Len; i++ ) {
        if( i && !(i & 0xf) ) DbgPrint( "\n" );
-       if( !(i & 0xf) ) DbgPrint( "%08x: ", (UINT)(Data + i) );
+       if( !(i & 0xf) ) DbgPrint( "%08x: ", (UINT_PTR)(Data + i) );
        DbgPrint( " %02x", Data[i] & 0xff );
     }
     DbgPrint("\n");
@@ -224,6 +224,12 @@ VOID DestroySocket( PAFD_FCB FCB ) {
     if( FCB->TdiDeviceName.Buffer )
        ExFreePool(FCB->TdiDeviceName.Buffer);
 
+    /* HACK HACK HACK */
+    TdiCloseDevice( FCB->Connection.Handle,
+                   FCB->Connection.Object );
+    TdiCloseDevice( FCB->AddressFile.Handle,
+                   FCB->AddressFile.Object );
+
     ExFreePool(FCB);
     AFD_DbgPrint(MIN_TRACE,("Deleted (%x)\n", FCB));