diff -r 6295dc2169f3 -r 8486d82aef45 connectivitylayer/isce/p2papi_dll/src/p2pif.cpp --- a/connectivitylayer/isce/p2papi_dll/src/p2pif.cpp Wed Apr 21 14:29:55 2010 +0300 +++ b/connectivitylayer/isce/p2papi_dll/src/p2pif.cpp Tue Oct 19 13:16:20 2010 +0300 @@ -107,9 +107,13 @@ ASSERT_PANIC_ALWAYS( ( KErrNone == loadStatus || KErrAlreadyExists == loadStatus), EP2PApiDriverLoadFailed ); TInt error( KErrInUse ); C_TRACE( ( _T( "RP2PIf::Open ldd" ) ) ); - TBuf8 info; + HBufC8* buffer = NULL; + TRAPD( err, buffer = HBufC8::NewL( KInfoLength ) ); + ASSERT_PANIC_ALWAYS( err == KErrNone, KErrNoMemory ); + + TPtr8 info = buffer->Des(); info.Append( aP2PProtocolId ); - // TODO: check wrong usage of driver load differently than from here + // check wrong usage of driver load differently than from here // KErrPermissionDenied( no capabilities) , KErrNotSupported (Wrong protocol id), KErrGeneral (DThread::Open), // KErrAlreadyExists same object had opened the interface with some other protocolid error = DoCreate( KP2PDriverName, @@ -118,6 +122,7 @@ NULL, &info, aType ); + delete buffer; if( KErrNone != error ) { C_TRACE( ( _T( "RP2PIf::Open 0x%x failed 0x%x error %d" ), this, aP2PProtocolId, error ) );