diff --git a/src/device_driver.c b/src/device_driver.c index f6d729fd..a2cbc03a 100644 --- a/src/device_driver.c +++ b/src/device_driver.c @@ -595,9 +595,7 @@ static int parse_command(const char *data) const char *command_name = json_object_get_string(data_root, "command_name"); if (!command_name) { - pr_err("missing 'command_name' property # command[%s]", command); - status = -EINVAL; - goto request_trace_out; + command_name = ""; } pr_debug("manage trace # command[%s] action[%s] pid[%d] uid[%d] command_name[%s]", command, action, pid, uid, command_name); diff --git a/src/trace.c b/src/trace.c index 4d9eafbb..bf3adfc6 100644 --- a/src/trace.c +++ b/src/trace.c @@ -360,6 +360,9 @@ int trace_log(const tcp_connection_context *conn_ctx, const char *message, int l va_end(args); send_message("log", json_serialize_to_string(root_value), task_ctx); + json_value_free(root_value); + + return ret; out: json_value_free(root_value);