error param should be paased to 'json_parser_load_from_data' since error_report acess to error message.
Signed-off-by: SuYeon <suyeon5.kim@samsung.com>
return ML_ERROR_OUT_OF_MEMORY;
}
- if (!json_parser_load_from_data (parser, jcstring, -1, NULL)) {
- _ml_error_report ("Failed to parse the json string. %s", err->message);
+ if (!json_parser_load_from_data (parser, jcstring, -1, &err)) {
+ _ml_error_report ("Failed to parse the json string. %s",
+ err ? err->message : "unknown error");
return ML_ERROR_INVALID_PARAMETER;
}