X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubox.git;a=blobdiff_plain;f=log%2Fsyslog.c;h=e8b6774afd31080c107ae7c8277b2700efb5d7cf;hp=f75fed9e5139cd0b810d1bba49e15686609e7497;hb=b0d5399c3db83c2c8f9d8aae944f873343b3a038;hpb=b62f35d2355eee2464d1877e8dd0797a92da5c5f diff --git a/log/syslog.c b/log/syslog.c index f75fed9..e8b6774 100644 --- a/log/syslog.c +++ b/log/syslog.c @@ -66,7 +66,7 @@ log_add(char *buf, int size, int source) /* bounce out if we don't have init'ed yet (regmatch etc will blow) */ if (!log) { - fprintf(stderr, buf); + fprintf(stderr, "%s", buf); return; } @@ -299,4 +299,5 @@ log_shutdown(void) ustream_free(&klog.stream); close(slog.fd.fd); close(klog.fd.fd); + free(log); }