On 28.10.2015 22:00, William Lewis wrote: > Would it not make more sense to set pAMDGPUEnt->fd to -1 beneath the > error_amdgpu tag?
No: > On 10/28/15 08:24, Jammy Zhou wrote: >> + pAMDGPUEnt = pPriv->ptr; [...] >> @@ -266,7 +256,6 @@ static Bool amdgpu_get_scrninfo(int entity_num, void >> *pci_dev) >> >> error_amdgpu: >> drmClose(pAMDGPUEnt->fd); >> - pAMDGPUEnt->fd = 0; >> error_fd: >> free(pPriv->ptr); >> return FALSE; pAMDGPUEnt == pPriv->ptr, so the memory pointed to by pAMDGPUEnt is freed immediately after the removed assignment. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
