Skip to content

Commit

Permalink
call va_end in error paths (Coverity)
Browse files Browse the repository at this point in the history
1404926 Missing varargs init or cleanup
  • Loading branch information
msmeissn committed Jun 5, 2017
1 parent 1190d79 commit 73bf500
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions camlibs/pentax/pslr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,7 @@ static int _ipslr_write_args(uint8_t cmd_2, ipslr_handle_t *p, int n, ...) {

res = scsi_write(fd, cmd, sizeof (cmd), buf, 4 * n);
if (res != PSLR_OK) {
va_end(ap);
return res;
}
} else {
Expand All @@ -1537,6 +1538,7 @@ static int _ipslr_write_args(uint8_t cmd_2, ipslr_handle_t *p, int n, ...) {
cmd[2] = i * 4;
res = scsi_write(fd, cmd, sizeof (cmd), buf, 4);
if (res != PSLR_OK) {
va_end(ap);
return res;
}
}
Expand Down

0 comments on commit 73bf500

Please sign in to comment.