diff options
author | Bryce W. Harrington <b.harrington@samsung.com> | 2014-04-28 18:44:08 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-04-29 13:25:50 -0700 |
commit | 66cd2c1ce19b396d42a32287d512ade42a2ba758 (patch) | |
tree | 876952c925bc62263026b954c9f025e44652380d | |
parent | 1e40a7ec7ae25ed8cdc570df9e8f2b2d863ce83d (diff) | |
download | weston-66cd2c1ce19b396d42a32287d512ade42a2ba758.tar.gz |
terminal: Convert all *alloc's to x*alloc's.
This ensures the allocation results are checked for NULL (out of
memory), and terminates the program in such a case.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
-rw-r--r-- | clients/terminal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/terminal.c b/clients/terminal.c index 5931ce2d..924549e1 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -772,10 +772,10 @@ terminal_resize_cells(struct terminal *terminal, } else { terminal->max_width = width; data_pitch = width * sizeof(union utf8_char); - data = zalloc(data_pitch * terminal->buffer_height); + data = xzalloc(data_pitch * terminal->buffer_height); attr_pitch = width * sizeof(struct attr); - data_attr = malloc(attr_pitch * terminal->buffer_height); - tab_ruler = zalloc(width); + data_attr = xmalloc(attr_pitch * terminal->buffer_height); + tab_ruler = xzalloc(width); attr_init(data_attr, terminal->curr_attr, width * terminal->buffer_height); |