summaryrefslogtreecommitdiffstats
path: root/physmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'physmap.c')
-rw-r--r--physmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/physmap.c b/physmap.c
index 72d589911..6c3681461 100644
--- a/physmap.c
+++ b/physmap.c
@@ -292,7 +292,7 @@ static void *physmap_common(const char *descr, uintptr_t phys_addr, size_t len,
}
if (autocleanup) {
- struct undo_physmap_data *d = malloc(sizeof(struct undo_physmap_data));
+ struct undo_physmap_data *d = malloc(sizeof(*d));
if (d == NULL) {
msg_perr("%s: Out of memory!\n", __func__);
physunmap_unaligned(virt_addr, len);