[haiku-commits] r39811 - in haiku/trunk/src: add-ons/input_server/devices/keyboard bin/consoled

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 10 Dec 2010 21:38:22 +0100 (CET)

Author: korli
Date: 2010-12-10 21:38:22 +0100 (Fri, 10 Dec 2010)
New Revision: 39811
Changeset: http://dev.haiku-os.org/changeset/39811

Modified:
   haiku/trunk/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp
   haiku/trunk/src/bin/consoled/consoled.cpp
Log:
* Keyboard input device addon: fix deadkey string leak.
* consoled: CID 1696, the found deadkey string is unused.


Modified: 
haiku/trunk/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp
===================================================================
--- 
haiku/trunk/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp   
    2010-12-10 20:06:18 UTC (rev 39810)
+++ 
haiku/trunk/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp   
    2010-12-10 20:38:22 UTC (rev 39811)
@@ -474,6 +474,7 @@
                                fInputMethodStarted = true;
 
                        activeDeadKey = newDeadKey;
+                       delete[] string;
                }
 
                if (msg != NULL && fOwner->EnqueueMessage(msg) != B_OK)

Modified: haiku/trunk/src/bin/consoled/consoled.cpp
===================================================================
--- haiku/trunk/src/bin/consoled/consoled.cpp   2010-12-10 20:06:18 UTC (rev 
39810)
+++ haiku/trunk/src/bin/consoled/consoled.cpp   2010-12-10 20:38:22 UTC (rev 
39811)
@@ -167,10 +167,6 @@
                        }
                } else if (isKeyDown) {
                        // start of a dead key
-                       char* string = NULL;
-                       int32 numBytes = 0;
-                       keymap.GetChars(keycode, modifiers, 0, &string, 
&numBytes);
-
                        activeDeadKey = newDeadKey;
                }
        }


Other related posts:

  • » [haiku-commits] r39811 - in haiku/trunk/src: add-ons/input_server/devices/keyboard bin/consoled - korli