Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#399] Fix segmentation fault in conf get JSON format #400

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

fluca1978
Copy link
Collaborator

The conf get implementation in JSON format was trying to extract the command status after having freed the JSON object. This commit changes the pgagroal_json_print_and_free_json_object() function making it returning the status code for the command contained (possibly) in the JSON object.
In this way, it is possible to call the fuction in a way like:

 int status = pgagroal_json_print_and_free_json_object( json );

and get back the status leaving the function to free the object.

Close #399

The `conf get` implementation in JSON format was trying to extract the
command status after having freed the JSON object.
This commit changes the `pgagroal_json_print_and_free_json_object()`
function making it returning the status code for the command
contained (possibly) in the JSON object.
In this way, it is possible to call the fuction in a way like:

     int status = pgagroal_json_print_and_free_json_object( json );

and get back the status leaving the function to free the object.

Close agroal#399
@jesperpedersen jesperpedersen self-requested a review February 16, 2024 13:00
@jesperpedersen jesperpedersen added the bug Something isn't working label Feb 16, 2024
@jesperpedersen jesperpedersen merged commit 20a1650 into agroal:master Feb 16, 2024
2 checks passed
@jesperpedersen
Copy link
Collaborator

Merged.

Thanks for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault while executing conf get in JSON format
2 participants