diff options
author | portix <portix@gmx.net> | 2012-01-19 18:12:53 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-01-19 18:12:53 +0100 |
commit | 0f0f0dfff22919569a0b470f0614dfb5462d5548 (patch) | |
tree | 0b9f3422099c77725c1bea1e9a1d167dd4a2add0 /src/util.c | |
parent | 23d82e8e62edbd5290f4727573c8154f62bbe9ce (diff) | |
download | dwb-0f0f0dfff22919569a0b470f0614dfb5462d5548.zip |
Fixing cppcheck warning 'mismatching allocation and dallocation'
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -107,13 +107,13 @@ util_keyval_to_char(guint keyval, gboolean ignore_whitespace) { if ( (unichar = gdk_keyval_to_unicode(keyval)) ) { if (ignore_whitespace && !g_unichar_isgraph(unichar)) return NULL; - key = dwb_malloc(6); + key = g_malloc0_n(6, sizeof(char)); if ( key && (length = g_unichar_to_utf8(unichar, key))) { memset(&key[length], '\0', 6-length); return key; } else - FREE(key); + g_free(key); } return NULL; }/*}}}*/ |