diff options
author | Oliver Stöneberg <firewave@users.noreply.github.com> | 2013-06-21 17:21:43 +0000 |
---|---|---|
committer | Oliver Stöneberg <firewave@users.noreply.github.com> | 2013-06-21 17:21:43 +0000 |
commit | 54e9da32660b5ad3fa7b189de1bf1cf60f669022 (patch) | |
tree | 752860775744243cc949c416cddf2d7c8c982ee7 /src/tools | |
parent | 5363a89597f83a518fa5b9af885b0a938ed28f1b (diff) |
chdman: fixed deletion of output file in case of an error (nw)
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/chdman.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/chdman.c b/src/tools/chdman.c index d84d4760010..2f49b47f217 100644 --- a/src/tools/chdman.c +++ b/src/tools/chdman.c @@ -1635,11 +1635,11 @@ static void do_create_raw(parameters_t ¶ms) } catch (...) { + delete chd; // delete the output file astring *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(*output_chd_str); - delete chd; throw; } } @@ -1808,11 +1808,11 @@ static void do_create_hd(parameters_t ¶ms) } catch (...) { + delete chd; // delete the output file astring *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(*output_chd_str); - delete chd; throw; } } @@ -1900,11 +1900,11 @@ static void do_create_cd(parameters_t ¶ms) } catch (...) { + delete chd; // delete the output file astring *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(*output_chd_str); - delete chd; throw; } } @@ -2025,11 +2025,11 @@ static void do_create_ld(parameters_t ¶ms) } catch (...) { + delete chd; // delete the output file astring *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(*output_chd_str); - delete chd; throw; } } @@ -2150,11 +2150,11 @@ static void do_copy(parameters_t ¶ms) } catch (...) { + delete chd; // delete the output file astring *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(*output_chd_str); - delete chd; throw; } } |