Add a missing error check for a malloc() call in idr_get().

Submitted by:	Matt Joras <mjoras@isilon.com>
Approved by:	re (gjb)
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Mark Johnston 2016-06-14 03:57:00 +00:00
parent 09e6df8038
commit 8de3effe5e

View File

@ -292,7 +292,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);
}