diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-03-11 16:06:31 +0530 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2014-03-13 11:01:40 +0530 |
commit | 50a3a706c880500ec305e7af51bd5f2363a8cc44 (patch) | |
tree | 5048357e0f00ac220b671942e210d41d0c739a5c /drivers/md/dm-table.c | |
parent | 40a66a5c983a8bf93a8860bd9500bfea83411e08 (diff) | |
parent | 6969595f011b46b49c3f1b9e0bd7da27768c1fd9 (diff) |
Merge branch 'linux-3.10.33' into dev-kernel-3.10
Bug 1456092
Change-Id: I3021247ec68a3c2dddd9e98cde13d70a45191d53
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 9e3a045eb7a2..bd88d3dade1e 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -215,6 +215,11 @@ int dm_table_create(struct dm_table **result, fmode_t mode, num_targets = dm_round_up(num_targets, KEYS_PER_NODE); + if (!num_targets) { + kfree(t); + return -ENOMEM; + } + if (alloc_targets(t, num_targets)) { kfree(t); return -ENOMEM; |