From 73bf500aea6e3f1d2b6e9c4519618d67e8efbf4a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 5 Jun 2017 18:11:13 +0200 Subject: [PATCH] call va_end in error paths (Coverity) 1404926 Missing varargs init or cleanup --- camlibs/pentax/pslr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/camlibs/pentax/pslr.c b/camlibs/pentax/pslr.c index e40f0e0172..db50030274 100644 --- a/camlibs/pentax/pslr.c +++ b/camlibs/pentax/pslr.c @@ -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 { @@ -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; } }