Skip to content

Commit

Permalink
[Media Common] fix profile list not free after malloc
Browse files Browse the repository at this point in the history
fix ult memory leak issue
  • Loading branch information
stellawuintel authored and intel-mediadev committed Jul 19, 2023
1 parent e56144a commit a1dbb87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions media_driver/linux/ult/ult_app/ddi_test_caps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ int Test_QueryConfigProfiles(VADriverContextP ctx, vector<FeatureID> &queriedFea
int ret = ctx->vtable->vaQueryConfigProfiles(ctx, profile_list, &num_profiles);
if (ret)
{
free(profile_list);
return -1;
}

Expand All @@ -70,6 +71,7 @@ int Test_QueryConfigProfiles(VADriverContextP ctx, vector<FeatureID> &queriedFea
}
else if (ret)
{
free(profile_list);
return -1;
}
else
Expand All @@ -81,6 +83,8 @@ int Test_QueryConfigProfiles(VADriverContextP ctx, vector<FeatureID> &queriedFea
}
}

free(profile_list);

return ret;
}

Expand Down

0 comments on commit a1dbb87

Please sign in to comment.