Warning, /education/labplot/readstat-1.1.9.patch is written in an unsupported language. File is not indexed.

0001 diff -ruNa a/src/bin/readstat.c b/src/bin/readstat.c
0002 --- a/src/bin/readstat.c        2023-02-20 20:09:24.000000000 +0100
0003 +++ b/src/bin/readstat.c        2024-02-02 17:41:51.463409738 +0100
0004 @@ -397,8 +397,6 @@
0005          module->finish(rs_ctx->module_ctx);
0006      }
0007  
0008 -    free(rs_ctx);
0009 -
0010      if (error != READSTAT_OK) {
0011          if (file_exists) {
0012              fprintf(stderr, "Error opening %s: File exists (Use -f to overwrite)\n", output_filename);
0013 @@ -406,9 +404,14 @@
0014              fprintf(stderr, "Error processing %s: %s\n", rs_ctx->error_filename, readstat_error_message(error));
0015              unlink(output_filename);
0016          }
0017 +
0018 +        free(rs_ctx);
0019 +
0020          return 1;
0021      }
0022  
0023 +    free(rs_ctx);
0024 +
0025      return 0;
0026  }
0027