Diffstat (limited to 'noncore/comm/keypebble/krfbdecoder.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index 837fcc5..27ae101 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp @@ -220,17 +220,17 @@ void KRFBDecoder::gotDesktopName() CHECK_PTR( buf ); con->read( buf, info->nameLength ); buf[ info->nameLength ] = '\0'; info->name = buf; owarn << "Desktop: " << info->name.latin1() << "" << oendl; - delete buf; + delete [] buf; // Get the format we'll really use and tell the server decidePixelFormat(); sendPixelFormat(); sendAllowedEncodings(); currentState = Idle; QString msg; @@ -530,17 +530,17 @@ void KRFBDecoder::gotRawRectChunk() // Read the rect data and copy it to the buffer. // // TODO: Replace this! int count = lines * w * format->bpp / 8; char *hack = new char[ count ]; con->read( hack, count ); buf->drawRawRectChunk( hack, x, y, w, lines ); - delete hack; + delete [] hack; // /TODO: h = h - lines; y = y + lines; if ( h > 0 ) { handleRawRect(); } @@ -723,17 +723,17 @@ void KRFBDecoder::gotServerCutText() /* For some reason QApplication::clipboard()->setText() segfaults when called * from within keypebble's mass of signals and slots owarn << "Server cut: " << cutbuf << "" << oendl; QString cutText( cutbuf ); // DANGER!! qApp->clipboard()->setText( cutText ); */ - delete cutbuf; + delete [] cutbuf; // Now wait for the update (again) if ( oldState == AwaitingUpdate ) { currentState = AwaitingUpdate; connect( con, SIGNAL( gotEnoughData() ), SLOT( gotUpdateHeader() ) ); con->waitForData( UpdateHeaderLength ); } else if ( oldState == Idle ) { currentState = Idle; |