summaryrefslogtreecommitdiff
path: root/flattree.c
diff options
context:
space:
mode:
Diffstat (limited to 'flattree.c')
-rw-r--r--flattree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/flattree.c b/flattree.c
index 76acd28..50190b8 100644
--- a/flattree.c
+++ b/flattree.c
@@ -601,7 +601,7 @@ static char *flat_read_string(struct inbuf *inb)
len++;
} while ((*p++) != '\0');
- str = strdup(inb->ptr);
+ str = xstrdup(inb->ptr);
inb->ptr += len;
@@ -643,7 +643,7 @@ static char *flat_read_stringtable(struct inbuf *inb, int offset)
p++;
}
- return strdup(inb->base + offset);
+ return xstrdup(inb->base + offset);
}
static struct property *flat_read_property(struct inbuf *dtbuf,
@@ -710,7 +710,7 @@ static char *nodename_from_path(const char *ppath, const char *cpath)
if (!streq(ppath, "/"))
plen++;
- return strdup(cpath + plen);
+ return xstrdup(cpath + plen);
}
static struct node *unflatten_tree(struct inbuf *dtbuf,