You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Closeagroal#399
jesperpedersen
changed the title
Swgmentation fault while executing conf get in JSON format
Segmentation fault while executing conf get in JSON format
Feb 16, 2024
fluca1978
added a commit
to fluca1978/pgagroal
that referenced
this issue
Feb 16, 2024
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.
Fixes also a memory leak in the `conf get` command: the JSON object
was not destroyed at the end.
Closeagroal#399
pgagroal
version4d14643
, when doingconf get
in JSON format there is a segfault:The other JSON commands seems to be find.
The text was updated successfully, but these errors were encountered: