diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-10 20:30:03 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-10 20:30:03 +0000 |
commit | 6825f1e67eb5ccf5083ef5e848f9c9f8de222170 (patch) | |
tree | 61d23cd280d3f70c2bdb09bdd4c2f97c4dde4540 /src/fe-text | |
parent | bb55d3ff4d0b9f889f3c9834c10ad014f2edf9a1 (diff) | |
download | irssi-6825f1e67eb5ccf5083ef5e848f9c9f8de222170.zip |
GC fixes.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3056 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/textbuffer-view.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index 77b21a2e..8eddae2f 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -268,11 +268,13 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) if (rec->count > 1) { for (pos = 0; lines != NULL; pos++) { - memcpy(&rec->lines[pos], lines->data, + void *data = lines->data; + + memcpy(&rec->lines[pos], data, sizeof(LINE_CACHE_SUB_REC)); - g_free(lines->data); - lines = g_slist_remove(lines, lines->data); + lines = g_slist_remove(lines, data); + g_free(data); } } |