]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Add missing va_end call in fcntl implementation. [BZ #32234]
authorBruno Haible <bruno@clisp.org>
Thu, 3 Oct 2024 11:25:29 +0000 (13:25 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 3 Oct 2024 18:18:29 +0000 (20:18 +0200)
* sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Add va_end call in two code paths.

sysdeps/mach/hurd/fcntl.c

index 9451ed564957dc35e1b2a4c43d7399d0738dca2b..2583f54ef200094b4171c5e3a71253de5e79247a 100644 (file)
@@ -148,6 +148,7 @@ __libc_fcntl (int fd, int cmd, ...)
            cmd = F_SETLKW64;
            break;
          default:
+           va_end (ap);
            return __hurd_fail (EINVAL);
          }
 
@@ -204,7 +205,10 @@ __libc_fcntl (int fd, int cmd, ...)
                 && fl->l_start != fl64.l_start)
             || (sizeof fl->l_len != sizeof fl64.l_len
                 && fl->l_len != fl64.l_len))
-             return __hurd_fail (EOVERFLOW);
+             {
+               va_end (ap);
+               return __hurd_fail (EOVERFLOW);
+             }
          }
 
        result = err ? __hurd_dfail (fd, err) : 0;