Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call va_end when we encounter an error trying to print sample fields. This was reported by Coverity: ** CID 509197: API usage errors (VARARGS) /iolog.c: 1025 in print_sample_fields() ________________________________________________________________________________________________________ *** CID 509197: API usage errors (VARARGS) /iolog.c: 1025 in print_sample_fields() 1019 int ret; 1020 1021 va_start(ap, fmt); 1022 ret = vsnprintf(*p, *left, fmt, ap); 1023 if (ret < 0 || ret >= *left) { 1024 log_err("sample file write failed: %d\n", ret); >>> CID 509197: API usage errors (VARARGS) >>> "va_end" was not called for "ap". 1025 return -1; 1026 } 1027 va_end(ap); 1028 1029 *p += ret; 1030 *left -= ret; Fixes: 3ec6b6d ("iolog: refactor flush_samples()") Signed-off-by: Vincent Fu <[email protected]>
- Loading branch information