projects
/
platform
/
upstream
/
kmscon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de2536f
)
tsm: unicode: fix not recreating the default-table all the time
author
David Herrmann
<dh.herrmann@googlemail.com>
Thu, 27 Sep 2012 10:11:52 +0000
(12:11 +0200)
committer
David Herrmann
<dh.herrmann@googlemail.com>
Thu, 27 Sep 2012 10:11:52 +0000
(12:11 +0200)
We actually created a new table all the time which led to huge memory
leaks. We now actually use the default table if it is available.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/tsm_unicode.c
patch
|
blob
|
history
diff --git
a/src/tsm_unicode.c
b/src/tsm_unicode.c
index
fcb296a
..
54bacfc
100644
(file)
--- a/
src/tsm_unicode.c
+++ b/
src/tsm_unicode.c
@@
-233,6
+233,9
@@
const uint32_t *tsm_symbol_get(struct tsm_symbol_table *tbl,
return sym;
}
+ if (!tbl)
+ tbl = tsm_symbol_table_default;
+
if (!tbl) {
ret = tsm_symbol_table_new(&tbl);
if (ret) {
@@
-270,6
+273,9
@@
tsm_symbol_t tsm_symbol_append(struct tsm_symbol_table *tbl,
bool res;
int ret;
+ if (!tbl)
+ tbl = tsm_symbol_table_default;
+
if (!tbl) {
ret = tsm_symbol_table_new(&tbl);
if (ret)