diff -r df914f383f5c -r 850be6a6885c librazor/error.c --- a/librazor/error.c Thu Oct 09 17:27:41 2014 +0100 +++ b/librazor/error.c Fri Jun 08 18:02:49 2018 +0100 @@ -42,6 +42,30 @@ return error->code; } +void +razor_error_set_object(struct razor_error *error, const char *object) +{ + if (!error) + return; + + free(error->object); + + if (object) + error->object = strdup(object); + else + error->object = NULL; + + if (error->obj_str) { + free(error->obj_str); + error->obj_str = NULL; + } + + if (error->msg) { + free(error->msg); + error->msg = NULL; + } +} + RAZOR_EXPORT const char * razor_error_get_object(struct razor_error *error) {