summaryrefslogtreecommitdiffstats
path: root/common/state/state.h
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-09-16 08:43:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-09-20 10:28:46 +0200
commit872e6069d59dfa2b6f73d5c6795d50a721ab625e (patch)
tree2286841ecb33af9dd64954ad5b2258472b375a59 /common/state/state.h
parent9cd9d98300af3039db7f146a47914baef2e8ea1b (diff)
downloadbarebox-872e6069d59dfa2b6f73d5c6795d50a721ab625e.tar.gz
barebox-872e6069d59dfa2b6f73d5c6795d50a721ab625e.tar.xz
state: copy backend of_path string
Caching pointers to device tree nodes or names is not safe. The barebox internal device tree may be changed by loading a new device tree or through fixup handlers. As a result, the string may be deleted. Use local copies of the full path instead. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/state.h')
-rw-r--r--common/state/state.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/state/state.h b/common/state/state.h
index 32146ca1bb..f930d06195 100644
--- a/common/state/state.h
+++ b/common/state/state.h
@@ -87,7 +87,7 @@ struct state_backend_storage {
struct state_backend {
struct state_backend_format *format;
struct state_backend_storage storage;
- const char *of_path;
+ char *of_path;
};
struct state {