]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Plug mem leak in moduli checkpoint option parsing.
authordtucker@openbsd.org <dtucker@openbsd.org>
Sun, 5 Mar 2023 08:18:58 +0000 (08:18 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Sun, 5 Mar 2023 08:33:39 +0000 (19:33 +1100)
From Coverity CID 291894.

OpenBSD-Commit-ID: 9b1aba2d049741ae21c8dc4560a7e29ab17310f4

ssh-keygen.c

index a49eb9447166dd41ca3b4fc07bb5df658f7e19f3..f7e929f61d01ff1848277635f18138d231b870f9 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.463 2023/02/28 08:45:24 dtucker Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.464 2023/03/05 08:18:58 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3053,6 +3053,7 @@ do_moduli_screen(const char *out_file, char **opts, size_t nopts)
            generator_wanted, checkpoint,
            start_lineno, lines_to_process) != 0)
                fatal("modulus screening failed");
+       free(checkpoint);
 #else /* WITH_OPENSSL */
        fatal("Moduli screening is not supported");
 #endif /* WITH_OPENSSL */