Skip to content

Commit eab868a

Browse files
committed
fix va_list leaks reported by static analyzer
Reported by Corax from https://feysh.com
1 parent 7e02cef commit eab868a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

xdo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,6 +1994,7 @@ void _xdo_debug(const xdo_t *xdo, const char *format, ...) {
19941994

19951995
va_start(args, format);
19961996
if (xdo->debug) {
1997+
va_end(args);
19971998
vfprintf(stderr, format, args);
19981999
fprintf(stderr, "\n");
19992000
}
@@ -2006,6 +2007,7 @@ void _xdo_eprintf(const xdo_t *xdo, int hushable, const char *format, ...) {
20062007

20072008
va_start(args, format);
20082009
if (xdo->quiet == True && hushable) {
2010+
va_end(args);
20092011
return;
20102012
}
20112013

0 commit comments

Comments
 (0)