[Mesa-dev] [PATCH 1/3] aubinator: fix double free
Iago Toral
itoral at igalia.com
Wed May 24 06:01:52 UTC 2017
All 3 patches are:
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
On Wed, 2017-05-24 at 02:19 +0100, Lionel Landwerlin wrote:
> Free previously allocated filename outside the for loop.
>
> CID: 1405014
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
> src/intel/tools/aubinator_error_decode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/tools/aubinator_error_decode.c
> b/src/intel/tools/aubinator_error_decode.c
> index 37c66ec0f68..506d39012b8 100644
> --- a/src/intel/tools/aubinator_error_decode.c
> +++ b/src/intel/tools/aubinator_error_decode.c
> @@ -874,8 +874,8 @@ main(int argc, char *argv[])
> file = fopen(filename, "r");
> if (!file) {
> int minor;
> + free(filename);
> for (minor = 0; minor < 64; minor++) {
> - free(filename);
> ret = asprintf(&filename, "%s/%d/i915_error_state",
> path, minor);
> assert(ret > 0);
>
More information about the mesa-dev
mailing list