mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-10-03 23:38:25 +00:00
helpers: Add check for allocation errors
Forgot to add the check after calloc Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
@@ -920,6 +920,8 @@ static void print_char(const char c, int times)
|
||||
char *str;
|
||||
|
||||
str = calloc(1, times + 1);
|
||||
ON_NULL_ABORT(str);
|
||||
|
||||
memset(str, c, times);
|
||||
info("%s\n", str);
|
||||
free(str);
|
||||
|
||||
Reference in New Issue
Block a user