You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2018/01/31 00:04:48 UTC

[1/2] guacamole-server git commit: GUACAMOLE-313: Ensure keydef structure is freed in all cases.

Repository: guacamole-server
Updated Branches:
  refs/heads/master 8ca6ff3a9 -> b1d050285


GUACAMOLE-313: Ensure keydef structure is freed in all cases.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/5f547fb1
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/5f547fb1
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/5f547fb1

Branch: refs/heads/master
Commit: 5f547fb1183a6ef61f3554b0b1e04e38c6871f26
Parents: 5f5b4ea
Author: Michael Jumper <mj...@apache.org>
Authored: Tue Jan 30 15:16:56 2018 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Jan 30 15:16:56 2018 -0800

----------------------------------------------------------------------
 src/guaclog/state.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/5f547fb1/src/guaclog/state.c
----------------------------------------------------------------------
diff --git a/src/guaclog/state.c b/src/guaclog/state.c
index 5e18708..b33bdd7 100644
--- a/src/guaclog/state.c
+++ b/src/guaclog/state.c
@@ -219,14 +219,19 @@ int guaclog_state_update_key(guaclog_state* state, int keysym, bool pressed) {
 
     /* Update tracked key state for modifiers */
     if (keydef->modifier) {
+
+        /* Keydef will be automatically freed if successfully added to state */
         if (guaclog_state_add_key(state, keydef, pressed))
             guaclog_keydef_free(keydef);
         else
             guaclog_state_trim_keys(state);
+
+        return 0;
+
     }
 
     /* Output key states only for printable keys */
-    else if (pressed) {
+    if (pressed) {
 
         if (guaclog_state_is_shortcut(state)) {
 
@@ -260,6 +265,7 @@ int guaclog_state_update_key(guaclog_state* state, int keysym, bool pressed) {
 
     }
 
+    guaclog_keydef_free(keydef);
     return 0;
 
 }


[2/2] guacamole-server git commit: GUACAMOLE-313: Merge ensure keydef structure is freed in all cases.

Posted by vn...@apache.org.
GUACAMOLE-313: Merge ensure keydef structure is freed in all cases.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/b1d05028
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/b1d05028
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/b1d05028

Branch: refs/heads/master
Commit: b1d050285ac2b5048b84da9c62a9376114d13f64
Parents: 8ca6ff3 5f547fb
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 30 19:04:22 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Jan 30 19:04:22 2018 -0500

----------------------------------------------------------------------
 src/guaclog/state.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------