diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-02 14:54:45 -0400 | 
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-02 14:54:45 -0400 | 
| commit | 4b948ef52add8c3a93aef6fd38a3928ccf4e36d7 (patch) | |
| tree | 479ee2c6e7f4097dfd0fbb0f3134f41623f218c2 /src | |
| parent | 23253d98bce3c4b21b887f175c7cd7135614ea5a (diff) | |
| download | stasis-4b948ef52add8c3a93aef6fd38a3928ccf4e36d7.tar.gz | |
Free resources on error in delivery_index_wheel_artifacts
Diffstat (limited to 'src')
| -rw-r--r-- | src/delivery_postprocess.c | 3 | 
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; | 
