Skip to content

Commit

Permalink
core: artifact: fix memory leak while processing artifact file names
Browse files Browse the repository at this point in the history
  • Loading branch information
joelguittet committed Jun 19, 2024
1 parent cb6c6c0 commit f19bb12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/mender-artifact.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ mender_artifact_parse_tar_header(mender_artifact_ctx_t *ctx) {
return MENDER_FAIL;
}
snprintf(tmp, str_length, "%s/%s", ctx->file.name, tar_header->name);
free(ctx->file.name);
} else {
if (NULL == (tmp = strdup(tar_header->name))) {
mender_log_error("Unable to allocate memory");
Expand Down

0 comments on commit f19bb12

Please sign in to comment.