* src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
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
diff --git a/ChangeLog b/ChangeLog
index 9d44af9..489a583 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2015-12-22 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
+
+2015-12-22 Werner Lemberg <wl@gnu.org>
+
[base] Make hash interface symmetric.
Use `num' and `str' infixes everywhere.
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 1a56980..08bb659 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1462,6 +1462,8 @@
if ( FT_NEW( hash ) )
goto Fail;
+ loader->subrs_hash = hash;
+
error = ft_hash_num_init( hash, memory );
if ( error )
goto Fail;
@@ -1571,10 +1573,7 @@
}
if ( !loader->num_subrs )
- {
- loader->num_subrs = num_subrs;
- loader->subrs_hash = hash;
- }
+ loader->num_subrs = num_subrs;
return;