[type1] Avoid dangling pointer (#46572). * src/type1/t1afm.c (T1_Read_Metrics): Properly reset `face->afm_data'.
diff --git a/ChangeLog b/ChangeLog
index 9133021..a9ce090 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-12-01 Werner Lemberg <wl@gnu.org>
+
+ [type1] Avoid dangling pointer (#46572).
+
+ * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
+ `face->afm_data'.
+
2015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
* include/freetype/ftlcdfil.h: Documentation tweak.
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 7a7bf82..883a740 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -248,6 +248,8 @@
FT_TRACE1(( "T1_Read_Metrics:"
" Freeing previously attached metrics data.\n" ));
T1_Done_Metrics( memory, (AFM_FontInfo)face->afm_data );
+
+ face->afm_data = NULL;
}
if ( FT_NEW( fi ) ||