Skip to content

Commit

Permalink
MFC r301877:
Browse files Browse the repository at this point in the history
Add a missing error check for a malloc() call in idr_get().
  • Loading branch information
markjdb committed Jul 16, 2016
1 parent 7d14547 commit 03f3328
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/ofed/include/linux/linux_idr.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ idr_get(struct idr *idr)
return (il);
}
il = malloc(sizeof(*il), M_IDR, M_ZERO | M_NOWAIT);
bitmap_fill(&il->bitmap, IDR_SIZE);
if (il != NULL)
bitmap_fill(&il->bitmap, IDR_SIZE);
return (il);
}

Expand Down

0 comments on commit 03f3328

Please sign in to comment.