summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2018-01-16 01:10:13 +0000
committerGitHub <noreply@github.com>2018-01-16 01:10:13 +0000
commit246b456900ca618b73bf633e0378965512988829 (patch)
tree9eb12e741a1f5fcd85f994e13d670967fc40fe6e /lib
parent0cd67c39511e8a370e17190a85e95357e715e8ee (diff)
parent96abc22b94b9871c77993be845e75af60f7ed3d9 (diff)
Merge pull request #1218 from antonio-nino-diaz-arm/an/xlat-fix
xlat v2: Correctly unmap regions on map error
Diffstat (limited to 'lib')
-rw-r--r--lib/xlat_tables_v2/xlat_tables_internal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xlat_tables_v2/xlat_tables_internal.c b/lib/xlat_tables_v2/xlat_tables_internal.c
index 0acfacbf..75c5a912 100644
--- a/lib/xlat_tables_v2/xlat_tables_internal.c
+++ b/lib/xlat_tables_v2/xlat_tables_internal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -893,7 +893,7 @@ int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm)
* Check if the mapping function actually managed to map
* anything. If not, just return now.
*/
- if (mm_cursor->base_va >= end_va)
+ if (mm->base_va >= end_va)
return -ENOMEM;
/*