diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-02-22 16:08:13 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-02-22 16:08:13 +0000 |
commit | 33d16e170e6a75d81a188afb35bb5e3517a410e9 (patch) | |
tree | 05ced992e3f047e3f63f5bba5d6bc08914119730 /desktop/textarea.c | |
parent | 20630d799194954c53cd976f7de848a3cf47e297 (diff) | |
parent | 8b82e926fde72b4f1becb04f12335cacc280c592 (diff) | |
download | netsurf-33d16e170e6a75d81a188afb35bb5e3517a410e9.tar.gz netsurf-33d16e170e6a75d81a188afb35bb5e3517a410e9.tar.bz2 |
Merge branch 'master' of git://git.netsurf-browser.org/netsurf into chris/bitmap-fonts
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r-- | desktop/textarea.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c index ece529e48..573da1d1d 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -934,10 +934,9 @@ static bool textarea_reflow_multiline(struct textarea *ta, assert(ta->flags & TEXTAREA_MULTILINE); if (ta->lines == NULL) { - ta->lines = - malloc(LINE_CHUNK_SIZE * sizeof(struct line_info)); + ta->lines = calloc(sizeof(struct line_info), LINE_CHUNK_SIZE); if (ta->lines == NULL) { - LOG(("malloc failed")); + LOG(("Failed to allocate memory for textarea lines")); return false; } ta->lines_alloc_size = LINE_CHUNK_SIZE; |