diff options
author | JP Abgrall <jpa@google.com> | 2014-02-14 17:31:40 -0800 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2014-02-14 17:31:40 -0800 |
commit | 39ef30bb574a41bba898dd924e081b678365accc (patch) | |
tree | b3ca19cd702261470d78749cef908b78723b34c8 /ext4_utils | |
parent | c0f813afc35c1ca497f35b46181b37c9b837726e (diff) | |
download | extras-39ef30bb574a41bba898dd924e081b678365accc.tar.gz |
ext4_utils: don't leave bad image file in case of error
Bug: 13029951
Change-Id: Ibe50a503c2d3988813b362790b7fba83383fb51e
Diffstat (limited to 'ext4_utils')
-rw-r--r-- | ext4_utils/make_ext4fs_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c index b6c740d2..754e51f0 100644 --- a/ext4_utils/make_ext4fs_main.c +++ b/ext4_utils/make_ext4fs_main.c @@ -203,6 +203,7 @@ int main(int argc, char **argv) exitcode = make_ext4fs_internal(fd, directory, mountpoint, fs_config_func, gzip, sparse, crc, wipe, sehnd, verbose); close(fd); - + if (exitcode && strcmp(filename, "-")) + unlink(filename); return exitcode; } |