Commit 362a304c authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Resolve discussions

parent 69b52438
......@@ -92,7 +92,9 @@ int callback_encryption_keys_delete(const struct _u_request * request,
if (error != NULL)
{
crypt_free(cd);
return send_simple_response(response, 500, "error", error);
r = send_simple_response(response, 500, "error", error);
free(error);
return r;
}
if (only_active)
{
......
......@@ -35,9 +35,9 @@ int callback_ssh_keys_put(const struct _u_request * request,
// Read SSH key from request.
const char * ssh_key;
ssh_key = json_string_value(json_object_get(json_input, "ssh-key"));
json_decref(json_input);
if (ssh_key == NULL)
{
json_decref(json_input);
return send_simple_response(response, 400, "error", "missing ssh-key");
}
......@@ -47,6 +47,7 @@ int callback_ssh_keys_put(const struct _u_request * request,
r = replace_ssh_key(id, ssh_key_with_command);
free(ssh_key_with_command);
json_decref(json_input);
if (r < 0)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment