diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2018-10-07 21:47:31 +0200 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-12-22 18:11:35 +0100 |
commit | 39fc4c17c49d248e0757bac9aa8863d205c7ad12 (patch) | |
tree | 9b46bb663d8e648c3f29a274d859256e46d6efd8 /apps/ocsp.c | |
parent | 23d221b771348e3e3ee316cd1190a4a344d145fc (diff) |
Coverity fix in apps/oscp
CID 1440002 (#1 of 1): Use after free (USE_AFTER_FREE)
Not a deadly error, because error was just before app exit.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7359)
Diffstat (limited to 'apps/ocsp.c')
-rw-r--r-- | apps/ocsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c index c129e9e514..fb0a95ba74 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -863,6 +863,7 @@ static void killall(int ret, pid_t *kidpids) for (i = 0; i < multi; ++i) if (kidpids[i] != 0) (void)kill(kidpids[i], SIGTERM); + OPENSSL_free(kidpids); sleep(1); exit(ret); } @@ -977,7 +978,6 @@ static void spawn_loop(void) } /* The loop above can only break on termsig */ - OPENSSL_free(kidpids); syslog(LOG_INFO, "terminating on signal: %d", termsig); killall(0, kidpids); } |