Skip to content
Browse files
Make free_opt(NULL) work like free(NULL)
Coverity spotted such a call in the error path of parse_select_node()
in the Juniper auth code, after allocating 'opt' fails.

Signed-off-by: David Woodhouse <>
  • Loading branch information
dwmw2 committed Oct 9, 2019
1 parent a357dfc commit 33260f4429fe84a3b1796816ee95d81864563092
Showing with 3 additions and 0 deletions.
  1. +3 −0 auth-common.c
@@ -138,6 +138,9 @@ void free_pass(char **p)

void free_opt(struct oc_form_opt *opt)
if (!opt)

/* for SELECT options, opt->value is a pointer to oc_choice->name */
if (opt->type != OC_FORM_OPT_SELECT) {

0 comments on commit 33260f4

Please sign in to comment.