Skip to content

Commit

Permalink
core: client: fix memory leak reported by sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
joelguittet committed Jun 20, 2024
1 parent 41195b8 commit cf02580
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/mender-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ mender_client_register_artifact_type(char *type,
== (tmp = (mender_client_artifact_type_t **)realloc(mender_client_artifact_types_list,
(mender_client_artifact_types_count + 1) * sizeof(mender_client_artifact_type_t *)))) {
mender_log_error("Unable to allocate memory");
free(artifact_type);
ret = MENDER_FAIL;
goto END;
}
Expand Down

0 comments on commit cf02580

Please sign in to comment.