diff options
author | Jjgod Jiang <gzjjgod@gmail.com> | 2015-05-23 23:19:32 +0000 |
---|---|---|
committer | Jjgod Jiang <gzjjgod@gmail.com> | 2015-05-23 23:19:32 +0000 |
commit | 201722a689ee2ca7e4e3b6a7c269e85c653de905 (patch) | |
tree | 451043c3770dd65cc9b14c80591782c41b230174 /Build/source | |
parent | c70f4a23171436f9a823305115310c9189db17f8 (diff) |
Fix a memory leak in the previous commit
git-svn-id: svn://tug.org/texlive/trunk@37493 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c index 13ebcb793a8..8d784791118 100644 --- a/Build/source/texk/dvipdfm-x/dvi.c +++ b/Build/source/texk/dvipdfm-x/dvi.c @@ -971,7 +971,7 @@ dvi_locate_native_font (const char *filename, uint32_t index, if (is_type1) { cff_font *cffont; - char **enc_vec; + char *enc_vec[256]; int code; fp = DPXFOPEN(filename, DPX_RES_TYPE_T1FONT); @@ -981,10 +981,7 @@ dvi_locate_native_font (const char *filename, uint32_t index, if (!is_pfb(fp)) ERROR("Failed to read Type 1 font \"%s\".", filename); - enc_vec = NEW(256, char *); - for (code = 0; code <= 0xff; code++) { - enc_vec[code] = NULL; - } + memset(enc_vec, 0, 256 * sizeof(char *)); cffont = t1_load_font(enc_vec, 0, fp); if (!cffont) ERROR("Failed to read Type 1 font \"%s\".", filename); |