kconfig: add xstrdup() helper
We already have xmalloc(), xcalloc(), and xrealloc((). Add xstrdup() as well to save tedious error handling. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
@@ -101,7 +101,7 @@ static struct message *message__new(const char *msg, char *option,
|
||||
if (self->files == NULL)
|
||||
goto out_fail;
|
||||
|
||||
self->msg = strdup(msg);
|
||||
self->msg = xstrdup(msg);
|
||||
if (self->msg == NULL)
|
||||
goto out_fail_msg;
|
||||
|
||||
|
Reference in New Issue
Block a user