Skip to content

Commit

Permalink
[#499Leak fix in master_key()
Browse files Browse the repository at this point in the history
Signed-off-by: Shikhar Soni <shikharish05@gmail.com>
  • Loading branch information
shikharish authored Jan 20, 2025
1 parent 9c44ae7 commit d83309c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,19 @@ master_key(char* password, bool generate_pwd, int pwd_length, int32_t output_for
file = NULL;
}

pgagroal_management_create_outcome_failure(j, 1, &outcome);

if (output_format == MANAGEMENT_OUTPUT_FORMAT_JSON)
{
pgagroal_json_print(j, FORMAT_JSON);
}
else
{
pgagroal_json_print(j, FORMAT_TEXT);
}

pgagroal_json_destroy(j);

return 1;
}

Expand Down

0 comments on commit d83309c

Please sign in to comment.