commit | fba5c5ff89163062922c3e560e871c087f2177c3 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@kernel.dk> | Tue Jan 29 22:29:09 2013 +0100 |
committer | Jens Axboe <axboe@kernel.dk> | Tue Jan 29 22:29:09 2013 +0100 |
tree | 32fa009e04a6159da80c93d20dd4f87fa7844eb4 | |
parent | 78799debc66f717469e751b3b9eb5dfa48cc547b [diff] [blame] |
smalloc: alloc failure cleanups Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/diskutil.c b/diskutil.c index 3681dde..e29d1c3 100644 --- a/diskutil.c +++ b/diskutil.c
@@ -281,6 +281,11 @@ dprint(FD_DISKUTIL, "add maj/min %d/%d: %s\n", majdev, mindev, path); du = smalloc(sizeof(*du)); + if (!du) { + log_err("fio: smalloc() pool exhausted\n"); + return NULL; + } + memset(du, 0, sizeof(*du)); INIT_FLIST_HEAD(&du->list); l = snprintf(du->path, sizeof(du->path), "%s/stat", path);