* src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/ChangeLog b/ChangeLog
index b1cbd69..b1a1bd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2016-03-30 Werner Lemberg <wl@gnu.org>
+ * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
+
+2016-03-30 Werner Lemberg <wl@gnu.org>
+
* src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
2016-03-30 Werner Lemberg <wl@gnu.org>
diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c
index 989dd05..89ed204 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;