Skip to content

Commit

Permalink
Fix a possible memory leak in load_builtin_compressions
Browse files Browse the repository at this point in the history
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #22585)

(cherry picked from commit daf26c2)
  • Loading branch information
bernd-edlinger authored and hlandau committed Nov 2, 2023
1 parent a9a1b3d commit 44c6554
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ssl/ssl_ciph.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ DEFINE_RUN_ONCE_STATIC(do_load_builtin_compressions)
comp->method = method;
comp->id = SSL_COMP_ZLIB_IDX;
comp->name = COMP_get_name(method);
sk_SSL_COMP_push(ssl_comp_methods, comp);
if (!sk_SSL_COMP_push(ssl_comp_methods, comp))
OPENSSL_free(comp);
sk_SSL_COMP_sort(ssl_comp_methods);
}
}
Expand Down

0 comments on commit 44c6554

Please sign in to comment.