Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleš Matěj <amatej@redhat.com>2021-06-02 11:48:14 +0300
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>2021-07-08 15:32:33 +0300
commit9a787d528cf068d2cc5a0cda4ec1784fdd889792 (patch)
tree97bcec28c9bf039115b6ac03590e8227728baaff
parent55f10c6916bd881f148d7bcab5b7ceb50e4821f7 (diff)
Add missing breaks in case of critical errors
If we don't break when the errors happen we will likely override the `err` GError variable, luckily glib2 complains about it but it is still a mistake.
-rw-r--r--src/compression_wrapper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compression_wrapper.c b/src/compression_wrapper.c
index d6b6291..cb1fd24 100644
--- a/src/compression_wrapper.c
+++ b/src/compression_wrapper.c
@@ -885,12 +885,14 @@ cr_close(CR_FILE *cr_file, GError **err)
ret = CRE_ZCK;
g_set_error(err, ERR_DOMAIN, CRE_ZCK,
"Unable to end final chunk: %s", zck_get_error(zck));
+ break;
}
}
if (!zck_close(zck)) {
ret = CRE_ZCK;
g_set_error(err, ERR_DOMAIN, CRE_ZCK,
"Unable to close zchunk file: %s", zck_get_error(zck));
+ break;
}
cr_ChecksumType cktype = cr_cktype_from_zck(zck, err);
if (cktype == CR_CHECKSUM_UNKNOWN) {