]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
maps: Terminate 'modes' map correctly.
authorJes Sorensen <jsorensen@fb.com>
Thu, 20 Apr 2017 04:13:31 +0000 (00:13 -0400)
committerJes Sorensen <jsorensen@fb.com>
Thu, 20 Apr 2017 04:13:31 +0000 (00:13 -0400)
While we are unlikely to fail here, terminate the modes map correctly
to ensure we don't start running over undefined data.

Signed-off-by: Jes Sorensen <jsorensen@fb.com>
maps.c

diff --git a/maps.c b/maps.c
index a8a4639a84ec3246d62f3912daca5c1da028edd9..a2d293ba47369944d49dcd51cea8f5f403bedad7 100644 (file)
--- a/maps.c
+++ b/maps.c
@@ -106,6 +106,7 @@ mapping_t modes[] = {
        { "grow", GROW},
        { "incremental", INCREMENTAL},
        { "auto-detect", AUTODETECT},
+       { NULL, 0 }
 };
 
 mapping_t faultylayout[] = {