summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDustin Kirkland <kirkland@canonical.com>2009-01-08 09:25:33 +1100
committerNeilBrown <neilb@suse.de>2009-01-08 09:25:33 +1100
commit1a0ee0baf049809f9e67d60bb8158801eada3bd5 (patch)
tree2603b2aa3faebbd4b97d14728426f93dc302b189 /config.c
parent89a10d84cb76492b7d8ea96d0a206b54702bcaff (diff)
downloadmdadm-1a0ee0baf049809f9e67d60bb8158801eada3bd5.tar.gz
Fail overtly when asprintf fails to allocate memory
.. rather that causing a less-obvious violation of segments. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index 121b337..78bbb9d 100644
--- a/config.c
+++ b/config.c
@@ -559,7 +559,7 @@ void mailfromline(char *line)
alert_mail_from = strdup(w);
else {
char *t= NULL;
- asprintf(&t, "%s %s", alert_mail_from, w);
+ xasprintf(&t, "%s %s", alert_mail_from, w);
free(alert_mail_from);
alert_mail_from = t;
}