summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/config.c b/config.c
index f471cf3..9aa8be4 100644
--- a/config.c
+++ b/config.c
@@ -564,10 +564,12 @@ void mailfromline(char *line)
if (alert_mail_from == NULL)
alert_mail_from = strdup(w);
else {
- char *t= NULL;
- asprintf(&t, "%s %s", alert_mail_from, w);
- free(alert_mail_from);
- alert_mail_from = t;
+ char *t = NULL;
+
+ if (asprintf(&t, "%s %s", alert_mail_from, w) > 0) {
+ free(alert_mail_from);
+ alert_mail_from = t;
+ }
}
}
}