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:
Otavio Pontes
2020-04-28 09:44:42 -07:00
parent 201950445a
commit d51a3863f4
+2
View File
@@ -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);