diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-04-13 06:25:59 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-04-13 06:25:59 +0100 |
commit | c2048c5c65aea99f2b79290b87635cb1d90863a6 (patch) | |
tree | 8aafdf588893ccdd65c8db53f5188f83f020675b /log.c | |
parent | 46cbbe3d4566885b8ad4235598389936f63c2c01 (diff) | |
parent | bedf2bd4372c60a525c22e6309f329cfd0bd07bc (diff) | |
download | rtmux-c2048c5c65aea99f2b79290b87635cb1d90863a6.tar.gz rtmux-c2048c5c65aea99f2b79290b87635cb1d90863a6.tar.bz2 rtmux-c2048c5c65aea99f2b79290b87635cb1d90863a6.zip |
Merge branch 'master' into 3.2-rc
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -110,15 +110,16 @@ log_vwrite(const char *msg, va_list ap) return; if (vasprintf(&fmt, msg, ap) == -1) - exit(1); - if (stravis(&out, fmt, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL) == -1) - exit(1); + return; + if (stravis(&out, fmt, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL) == -1) { + free(fmt); + return; + } gettimeofday(&tv, NULL); if (fprintf(log_file, "%lld.%06d %s\n", (long long)tv.tv_sec, - (int)tv.tv_usec, out) == -1) - exit(1); - fflush(log_file); + (int)tv.tv_usec, out) != -1) + fflush(log_file); free(out); free(fmt); |