Free CPER entry when it's committed to CPER ring to avoid memory leak.
Signed-off-by: Xiang Liu <xiang.liu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
return ret;
amdgpu_cper_ring_write(ring, fatal, fatal->record_length);
+ kfree(fatal);
return 0;
}
return ret;
amdgpu_cper_ring_write(ring, bp_threshold, bp_threshold->record_length);
+ kfree(bp_threshold);
return 0;
}
}
amdgpu_cper_ring_write(ring, corrected, corrected->record_length);
+ kfree(corrected);
return 0;
}