Skip to content

Commit aad24f5

Browse files
committed
src/ly_common.c: coverity fix - missing varargs init or cleanup
1 parent 7345837 commit aad24f5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ly_common.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ ly_utf8_and_equal(const char *input, int bytes, ...)
325325

326326
/* compare each byte */
327327
if (((uint8_t)input[i] & and) != (uint8_t)byte) {
328+
va_end(ap);
328329
return 0;
329330
}
330331
}
@@ -355,8 +356,10 @@ ly_utf8_less(const char *input, int bytes, ...)
355356

356357
/* compare until bytes differ */
357358
if ((uint8_t)input[i] > (uint8_t)byte) {
359+
va_end(ap);
358360
return 0;
359361
} else if ((uint8_t)input[i] < (uint8_t)byte) {
362+
va_end(ap);
360363
return 1;
361364
}
362365
}
@@ -388,8 +391,10 @@ ly_utf8_greater(const char *input, int bytes, ...)
388391

389392
/* compare until bytes differ */
390393
if ((uint8_t)input[i] > (uint8_t)byte) {
394+
va_end(ap);
391395
return 1;
392396
} else if ((uint8_t)input[i] < (uint8_t)byte) {
397+
va_end(ap);
393398
return 0;
394399
}
395400
}

0 commit comments

Comments
 (0)