diff options
author | Werner Lemberg <wl@gnu.org> | 2016-03-30 18:55:27 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2016-03-30 18:55:27 +0200 |
commit | fb550bf4666586eedf840f7331c4796ad0739f1d (patch) | |
tree | acf512469557266b4e8010512342635a8bff35b0 /src/pfr | |
parent | aff6ebb9a6e9b8cfdf47dcb0fe1b36396241a052 (diff) | |
download | freetype2-fb550bf4666586eedf840f7331c4796ad0739f1d.tar.gz |
* src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
Diffstat (limited to 'src/pfr')
-rw-r--r-- | src/pfr/pfrload.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c index 989dd05ce..89ed204e2 100644 --- a/src/pfr/pfrload.c +++ b/src/pfr/pfrload.c @@ -743,6 +743,9 @@ FT_UInt n, ok; + if ( *astring ) + FT_FREE( *astring ); + if ( len > 0 && p[len - 1] == 0 ) len--; @@ -758,15 +761,13 @@ if ( ok ) { - if ( *astring ) - FT_FREE( *astring ); - if ( FT_ALLOC( result, len + 1 ) ) goto Exit; FT_MEM_COPY( result, p, len ); result[len] = 0; } + Exit: *astring = result; return error; |