Merge pull request #2734 from axos88/patch-1

Fix malloc size for file path
This commit is contained in:
Roger Light 2023-04-01 08:48:30 +01:00 committed by GitHub
commit ec6a56d759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -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

View File

@ -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");