summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/fmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/fmap.c b/src/lib/fmap.c
index 2abe138cdd..418e715b3e 100644
--- a/src/lib/fmap.c
+++ b/src/lib/fmap.c
@@ -164,6 +164,9 @@ int fmap_locate_area(const char *name, struct region *ar)
struct region_device fmrd;
size_t offset;
+ if (name == NULL || ar == NULL)
+ return -1;
+
if (find_fmap_directory(&fmrd))
return -1;
@@ -206,6 +209,9 @@ int fmap_find_region_name(const struct region * const ar,
struct region_device fmrd;
size_t offset;
+ if (name == NULL || ar == NULL)
+ return -1;
+
if (find_fmap_directory(&fmrd))
return -1;