summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-01-19 18:12:53 +0100
committerportix <portix@gmx.net>2012-01-19 18:12:53 +0100
commit0f0f0dfff22919569a0b470f0614dfb5462d5548 (patch)
tree0b9f3422099c77725c1bea1e9a1d167dd4a2add0 /src/util.c
parent23d82e8e62edbd5290f4727573c8154f62bbe9ce (diff)
downloaddwb-0f0f0dfff22919569a0b470f0614dfb5462d5548.zip
Fixing cppcheck warning 'mismatching allocation and dallocation'
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 7756da36..e78c6a19 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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;
}/*}}}*/