check vasprintf return code
This commit is contained in:
parent
e82e26a24d
commit
4d66841811
|
@ -105,7 +105,9 @@ __attribute__((format(printf, 1, 2))) static void set_statusline_error(const cha
|
||||||
char *message;
|
char *message;
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
(void)vasprintf(&message, format, args);
|
if (vasprintf(&message, format, args) == -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct status_block *err_block = scalloc(1, sizeof(struct status_block));
|
struct status_block *err_block = scalloc(1, sizeof(struct status_block));
|
||||||
err_block->full_text = i3string_from_utf8("Error: ");
|
err_block->full_text = i3string_from_utf8("Error: ");
|
||||||
|
|
Loading…
Reference in New Issue