diff --git a/.github/workflows/delete-old-workflow-runs.yml b/.github/workflows/delete-old-workflow-runs.yml new file mode 100644 index 00000000..29f9ca05 --- /dev/null +++ b/.github/workflows/delete-old-workflow-runs.yml @@ -0,0 +1,18 @@ +name: Delete old workflow runs +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' +# Run monthly, at 00:00 on the 1st day of month. + +jobs: + del_runs: + runs-on: ubuntu-latest + steps: + - name: Delete workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 30 + keep_minimum_runs: 6 diff --git a/plugins/dynamic-security/plugin.c b/plugins/dynamic-security/plugin.c index 3ff1054a..980a3415 100644 --- a/plugins/dynamic-security/plugin.c +++ b/plugins/dynamic-security/plugin.c @@ -452,7 +452,7 @@ void dynsec__config_save(void) /* Save to file */ file_path_len = strlen(config_file) + 1; - file_path = mosquitto_malloc(file_path_len); + file_path = mosquitto_malloc(file_path_len + 4); if(file_path == NULL){ mosquitto_free(json_str); mosquitto_log_printf(MOSQ_LOG_ERR, "Error saving Dynamic security plugin config: Out of memory.\n");