aboutsummaryrefslogtreecommitdiff
path: root/src/delivery_postprocess.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/delivery_postprocess.c')
-rw-r--r--src/delivery_postprocess.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/delivery_postprocess.c b/src/delivery_postprocess.c
index 43a1105..1a902e3 100644
--- a/src/delivery_postprocess.c
+++ b/src/delivery_postprocess.c
@@ -208,6 +208,7 @@ int delivery_index_wheel_artifacts(struct Delivery *ctx) {
sprintf(top_index, "%s/index.html", ctx->storage.wheel_artifact_dir);
top_fp = fopen(top_index, "w+");
if (!top_fp) {
+ closedir(dp);
return -2;
}
@@ -223,6 +224,7 @@ int delivery_index_wheel_artifacts(struct Delivery *ctx) {
sprintf(bottom_index, "%s/%s/index.html", ctx->storage.wheel_artifact_dir, rec->d_name);
bottom_fp = fopen(bottom_index, "w+");
if (!bottom_fp) {
+ closedir(dp);
return -3;
}
@@ -237,6 +239,7 @@ int delivery_index_wheel_artifacts(struct Delivery *ctx) {
sprintf(dpath, "%s/%s", ctx->storage.wheel_artifact_dir, rec->d_name);
struct StrList *packages = listdir(dpath);
if (!packages) {
+ closedir(dp);
fclose(top_fp);
fclose(bottom_fp);
return -4;