mtd: partitions: Use xstrdup
The return value of strdup is not checked. Use xstrdup instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
b798f55495
commit
31d8b2e83d
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ struct mtd_info *mtd_add_partition(struct mtd_info *mtd, off_t offset,
|
|||
|
||||
part->block_isbad = mtd->block_isbad ? mtd_part_block_isbad : NULL;
|
||||
part->size = size;
|
||||
part->name = strdup(name);
|
||||
part->name = xstrdup(name);
|
||||
|
||||
part->master_offset = offset;
|
||||
part->master = mtd;
|
||||
|
|
Loading…
Reference in a new issue