summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cee-syslog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/cee-syslog.c b/lib/cee-syslog.c
index d6ae7fc..2cb5447 100644
--- a/lib/cee-syslog.c
+++ b/lib/cee-syslog.c
@@ -160,7 +160,8 @@ _cee_json_vappend (struct json_object *json, va_list ap)
char *fmt = (char *)va_arg (ap, char *);
char *value;
- vasprintf (&value, fmt, ap);
+ if (vasprintf (&value, fmt, ap) == -1)
+ abort ();
json_object_object_add (json, key, json_object_new_string (value));
free (value);
}
@@ -227,7 +228,8 @@ _cee_vformat (struct json_object *jo, int format_version,
{
char *value;
- vasprintf (&value, msg_format, ap);
+ if (vasprintf (&value, msg_format, ap) == -1)
+ abort ();
json_object_object_add (jo, "msg", json_object_new_string (value));
free (value);