Skip to content

Commit

Permalink
add-ons: configure: fix double free error
Browse files Browse the repository at this point in the history
  • Loading branch information
joelguittet committed Jun 19, 2024
1 parent 43021ab commit e41847c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions add-ons/src/mender-configure.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static mender_configure_config_t mender_configure_config;
static mender_configure_callbacks_t mender_configure_callbacks;

/**
* @brief Mender configure
* @brief Mender configure keystore
*/
static mender_keystore_t *mender_configure_keystore = NULL;
static void * mender_configure_mutex = NULL;
Expand Down Expand Up @@ -406,7 +406,7 @@ mender_configure_download_artifact_callback(
goto END;
}
cJSON_AddStringToObject(json_device_config, "artifact_name", artifact_name);
cJSON_AddItemToObject(json_device_config, "config", meta_data);
cJSON_AddItemToObject(json_device_config, "config", cJSON_Duplicate(meta_data, true));
if (NULL == (device_config = cJSON_PrintUnformatted(json_device_config))) {
mender_log_error("Unable to allocate memory");
ret = MENDER_FAIL;
Expand Down

0 comments on commit e41847c

Please sign in to comment.