From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLpY2-0003lh-88 for barebox@lists.infradead.org; Thu, 12 Feb 2015 08:55:01 +0000 From: Sascha Hauer Date: Thu, 12 Feb 2015 09:54:20 +0100 Message-Id: <1423731274-9860-4-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1423731274-9860-1-git-send-email-s.hauer@pengutronix.de> References: <1423731274-9860-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 03/17] mtd: partitions: Use xstrdup To: Barebox List The return value of strdup is not checked. Use xstrdup instead. Signed-off-by: Sascha Hauer --- drivers/mtd/partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/partition.c b/drivers/mtd/partition.c index e393fa6..033a7d2 100644 --- a/drivers/mtd/partition.c +++ b/drivers/mtd/partition.c @@ -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; -- 2.1.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox