diff options
-rw-r--r-- | e2fsprogs/e2p/feature.c | 4 | ||||
-rw-r--r-- | e2fsprogs/e2p/mntopts.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/e2fsprogs/e2p/feature.c b/e2fsprogs/e2p/feature.c index f4e920a98..a4f3c64cb 100644 --- a/e2fsprogs/e2p/feature.c +++ b/e2fsprogs/e2p/feature.c | |||
@@ -154,9 +154,7 @@ int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array) | |||
154 | unsigned int mask; | 154 | unsigned int mask; |
155 | int compat_type; | 155 | int compat_type; |
156 | 156 | ||
157 | buf = malloc(strlen(str)+1); | 157 | buf = xmalloc(strlen(str)+1); |
158 | if (!buf) | ||
159 | return 1; | ||
160 | strcpy(buf, str); | 158 | strcpy(buf, str); |
161 | cp = buf; | 159 | cp = buf; |
162 | while (cp && *cp) { | 160 | while (cp && *cp) { |
diff --git a/e2fsprogs/e2p/mntopts.c b/e2fsprogs/e2p/mntopts.c index 6d0eca0ae..735260ce0 100644 --- a/e2fsprogs/e2p/mntopts.c +++ b/e2fsprogs/e2p/mntopts.c | |||
@@ -99,9 +99,7 @@ int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok) | |||
99 | int neg; | 99 | int neg; |
100 | unsigned int mask; | 100 | unsigned int mask; |
101 | 101 | ||
102 | buf = malloc(strlen(str)+1); | 102 | buf = xmalloc(strlen(str)+1); |
103 | if (!buf) | ||
104 | return 1; | ||
105 | strcpy(buf, str); | 103 | strcpy(buf, str); |
106 | cp = buf; | 104 | cp = buf; |
107 | while (cp && *cp) { | 105 | while (cp && *cp) { |