refactor: improve code
All checks were successful
Autotools pipeline / build-amd64 (push) Successful in 35s
Autotools pipeline / build-arm64 (push) Successful in 34s
Autotools pipeline / build-arm (push) Successful in 32s

This commit is contained in:
2026-04-06 19:00:51 +02:00
parent 903fcefc2a
commit 3b8d7744b5
3 changed files with 10 additions and 7 deletions

View File

@@ -751,8 +751,10 @@ static int _add_to_zip(struct zip_t *zip, const char *path, const char *root)
// add it to zip
if (zip_entry_open(zip, root) == -1)
return -1;
if (zip_entry_fwrite(zip, path) == -1)
if (zip_entry_fwrite(zip, path) == -1) {
zip_entry_close(zip);
return -1;
}
zip_entry_close(zip);
}
return 0;