mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
gallium/u_upload_mgr: fix a serious memory leak
It can eat all memory and crash in a matter of minutes with r600g.
(cherry picked from commit 87592cff57)
This commit is contained in:
parent
914368538e
commit
d40df80732
1 changed files with 1 additions and 2 deletions
|
|
@ -168,7 +168,7 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
|||
* sure the caller doesn't get garbage values.
|
||||
*/
|
||||
*out_offset = ~0;
|
||||
*outbuf = NULL;
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
|
||||
/* Make sure we have enough space in the upload buffer
|
||||
|
|
@ -190,7 +190,6 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
|||
PIPE_TRANSFER_UNSYNCHRONIZED,
|
||||
&upload->transfer);
|
||||
if (!upload->map) {
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
upload->transfer = NULL;
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue