diff options
Diffstat (limited to 'other/bootstrap_daemon/src/log_backend_syslog.c')
-rw-r--r-- | other/bootstrap_daemon/src/log_backend_syslog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/other/bootstrap_daemon/src/log_backend_syslog.c b/other/bootstrap_daemon/src/log_backend_syslog.c index 9fc6d18f..73ecc964 100644 --- a/other/bootstrap_daemon/src/log_backend_syslog.c +++ b/other/bootstrap_daemon/src/log_backend_syslog.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <assert.h> | 31 | #include <assert.h> |
32 | #include <stdio.h> | 32 | #include <stdio.h> |
33 | #include <stdlib.h> | ||
33 | #include <syslog.h> | 34 | #include <syslog.h> |
34 | 35 | ||
35 | void log_backend_syslog_open(void) | 36 | void log_backend_syslog_open(void) |
@@ -72,8 +73,9 @@ void log_backend_syslog_write(LOG_LEVEL level, const char *format, va_list args) | |||
72 | return; | 73 | return; |
73 | } | 74 | } |
74 | 75 | ||
75 | VLA(char, buf, size + 1); | 76 | char *buf = (char *)malloc(size + 1); |
76 | vsnprintf(buf, size + 1, format, args); | 77 | vsnprintf(buf, size + 1, format, args); |
77 | 78 | ||
78 | syslog(log_backend_syslog_level(level), "%s", buf); | 79 | syslog(log_backend_syslog_level(level), "%s", buf); |
80 | free(buf); | ||
79 | } | 81 | } |