[psaux] Fix memory leak (#58626).
* src/psaux/psstack.c (cf2_stack_init): If `cf2_stack_init' fails to allocate the stack, return error early.
This commit is contained in:
parent
09b98060d3
commit
2e2f3cb5ba
|
@ -1,3 +1,10 @@
|
||||||
|
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
|
||||||
|
|
||||||
|
[psaux] Fix memory leak (#58626).
|
||||||
|
|
||||||
|
* src/psaux/psstack.c (cf2_stack_init): If `cf2_stack_init' fails to
|
||||||
|
allocate the stack, return error early.
|
||||||
|
|
||||||
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
|
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
|
||||||
|
|
||||||
[base] Fix memory leak (#58624).
|
[base] Fix memory leak (#58624).
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
CF2_Stack stack = NULL;
|
CF2_Stack stack = NULL;
|
||||||
|
|
||||||
|
|
||||||
if ( !FT_NEW( stack ) )
|
if ( FT_NEW( stack ) )
|
||||||
{
|
return NULL;
|
||||||
|
|
||||||
/* initialize the structure; FT_NEW zeroes it */
|
/* initialize the structure; FT_NEW zeroes it */
|
||||||
stack->memory = memory;
|
stack->memory = memory;
|
||||||
stack->error = e;
|
stack->error = e;
|
||||||
}
|
|
||||||
|
|
||||||
/* allocate the stack buffer */
|
/* allocate the stack buffer */
|
||||||
if ( FT_NEW_ARRAY( stack->buffer, stackSize ) )
|
if ( FT_NEW_ARRAY( stack->buffer, stackSize ) )
|
||||||
|
|
Loading…
Reference in New Issue