mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 03:00:24 +01:00
progs/tests: Fix memory leak in texdown.c if malloc fails.
This commit is contained in:
parent
e12c9a6f3a
commit
e3cfd78969
1 changed files with 2 additions and 0 deletions
|
|
@ -176,6 +176,8 @@ MeasureDownloadRate(void)
|
|||
orig_getImage = (GLubyte *) malloc(image_bytes + ALIGN);
|
||||
if (!orig_texImage || !orig_getImage) {
|
||||
DownloadRate = 0.0;
|
||||
free(orig_texImage);
|
||||
free(orig_getImage);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue