]> Dogcows Code - chaz/openbox/blobdiff - openbox/translate.c
Fix some memleaks
[chaz/openbox] / openbox / translate.c
index a9ff3e264c0cf774588235766a7d3ebaab42fefe..e7962ad575561b2f89e3e8d7e72e94b643eb1e9f 100644 (file)
@@ -68,7 +68,7 @@ gboolean translate_button(const gchar *str, guint *state, guint *button)
     gboolean ret = FALSE;
 
     parsed = g_strsplit(str, "-", -1);
-    
+
     /* first, find the button (last token) */
     l = NULL;
     for (i = 0; parsed[i] != NULL; ++i)
@@ -110,7 +110,7 @@ gboolean translate_key(const gchar *str, guint *state, guint *keycode)
     KeySym sym;
 
     parsed = g_strsplit(str, "-", -1);
-    
+
     /* first, find the key (last token) */
     l = NULL;
     for (i = 0; parsed[i] != NULL; ++i)
@@ -145,7 +145,7 @@ gboolean translate_key(const gchar *str, guint *state, guint *keycode)
         *keycode = XKeysymToKeycode(ob_display, sym);
     }
     if (!*keycode) {
-        g_message(_("Requested key '%s' does not exist on the display"), l); 
+        g_message(_("Requested key '%s' does not exist on the display"), l);
         goto translation_fail;
     }
 
@@ -179,5 +179,6 @@ gunichar translate_unichar(guint keycode)
         if (unikey == (gunichar)-1 || unikey == (gunichar)-2 || unikey == 0)
             unikey = 0;
     }
+    g_free(key);
     return unikey;
 }
This page took 0.025499 seconds and 4 git commands to generate.