Coverity scan findings - memleaks, unused vars, potential nullptr dereferences

This commit is contained in:
Jan Rybar
2021-05-06 16:30:54 +02:00
parent 2763b9880a
commit a1bc3bf207
3 changed files with 7 additions and 2 deletions

3
pmap.c
View File

@@ -346,6 +346,9 @@ static void print_extended_maps (FILE *f)
if (listnode == NULL) {
assert(firstmapping == 2);
listnode = calloc(1, sizeof *listnode);
if (listnode == NULL)
xerrx(EXIT_FAILURE, _("ERROR: memory allocation failed"));
if (listhead == NULL) {
assert(listtail == NULL);
listhead = listnode;