if (h->have_opendb_entry) {
struct odb_lock *lck;
- char *name = NULL;
+ const char *name = NULL;
lck = odb_lock(h, h->pvfs->odb_context, &h->odb_locking_key);
if (lck == NULL) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- status = odb_get_path(lck, (const char **) &name);
+ status = odb_get_path(lck, &name);
if (NT_STATUS_IS_OK(status)) {
/*
* This relies an the fact that
const char *new_file;
char *new_orig;
char *delim;
+ char *full_name = discard_const_p(char, name);
delim = strrchr(name, '/');
if (!delim) {
talloc_free(h->name->original_name);
talloc_free(h->name->full_name);
- h->name->full_name = talloc_steal(h->name, name);
+ h->name->full_name = talloc_steal(h->name, full_name);
h->name->original_name = new_orig;
}
}