updated for version 7.4.533
Problem: ":hardcopy" leaks memory in case of errors. Solution: Free memory in all code paths. (Christian Brabandt)
This commit is contained in:
@ -2960,12 +2960,12 @@ mch_print_begin(psettings)
|
|||||||
if (!prt_find_resource("prolog", res_prolog))
|
if (!prt_find_resource("prolog", res_prolog))
|
||||||
{
|
{
|
||||||
EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\""));
|
EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\""));
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
if (!prt_open_resource(res_prolog))
|
if (!prt_open_resource(res_prolog))
|
||||||
return FALSE;
|
goto theend;
|
||||||
if (!prt_check_resource(res_prolog, PRT_PROLOG_VERSION))
|
if (!prt_check_resource(res_prolog, PRT_PROLOG_VERSION))
|
||||||
return FALSE;
|
goto theend;
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
if (prt_out_mbyte)
|
if (prt_out_mbyte)
|
||||||
{
|
{
|
||||||
@ -2973,12 +2973,12 @@ mch_print_begin(psettings)
|
|||||||
if (!prt_find_resource("cidfont", res_cidfont))
|
if (!prt_find_resource("cidfont", res_cidfont))
|
||||||
{
|
{
|
||||||
EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\""));
|
EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\""));
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
if (!prt_open_resource(res_cidfont))
|
if (!prt_open_resource(res_cidfont))
|
||||||
return FALSE;
|
goto theend;
|
||||||
if (!prt_check_resource(res_cidfont, PRT_CID_PROLOG_VERSION))
|
if (!prt_check_resource(res_cidfont, PRT_CID_PROLOG_VERSION))
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3012,12 +3012,12 @@ mch_print_begin(psettings)
|
|||||||
{
|
{
|
||||||
EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
|
EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
|
||||||
p_encoding);
|
p_encoding);
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!prt_open_resource(res_encoding))
|
if (!prt_open_resource(res_encoding))
|
||||||
return FALSE;
|
goto theend;
|
||||||
/* For the moment there are no checks on encoding resource files to
|
/* For the moment there are no checks on encoding resource files to
|
||||||
* perform */
|
* perform */
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
@ -3034,10 +3034,10 @@ mch_print_begin(psettings)
|
|||||||
{
|
{
|
||||||
EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
|
EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
|
||||||
prt_ascii_encoding);
|
prt_ascii_encoding);
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
if (!prt_open_resource(res_encoding))
|
if (!prt_open_resource(res_encoding))
|
||||||
return FALSE;
|
goto theend;
|
||||||
/* For the moment there are no checks on encoding resource files to
|
/* For the moment there are no checks on encoding resource files to
|
||||||
* perform */
|
* perform */
|
||||||
}
|
}
|
||||||
@ -3050,7 +3050,7 @@ mch_print_begin(psettings)
|
|||||||
{
|
{
|
||||||
EMSG2(_("E620: Unable to convert to print encoding \"%s\""),
|
EMSG2(_("E620: Unable to convert to print encoding \"%s\""),
|
||||||
p_encoding);
|
p_encoding);
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
prt_do_conv = TRUE;
|
prt_do_conv = TRUE;
|
||||||
}
|
}
|
||||||
@ -3063,10 +3063,10 @@ mch_print_begin(psettings)
|
|||||||
{
|
{
|
||||||
EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
|
EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""),
|
||||||
prt_cmap);
|
prt_cmap);
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
if (!prt_open_resource(res_cmap))
|
if (!prt_open_resource(res_cmap))
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3140,15 +3140,15 @@ mch_print_begin(psettings)
|
|||||||
|
|
||||||
/* Add required procsets - NOTE: order is important! */
|
/* Add required procsets - NOTE: order is important! */
|
||||||
if (!prt_add_resource(res_prolog))
|
if (!prt_add_resource(res_prolog))
|
||||||
return FALSE;
|
goto theend;
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
if (prt_out_mbyte)
|
if (prt_out_mbyte)
|
||||||
{
|
{
|
||||||
/* Add CID font procset, and any user supplied CMap */
|
/* Add CID font procset, and any user supplied CMap */
|
||||||
if (!prt_add_resource(res_cidfont))
|
if (!prt_add_resource(res_cidfont))
|
||||||
return FALSE;
|
goto theend;
|
||||||
if (prt_custom_cmap && !prt_add_resource(res_cmap))
|
if (prt_custom_cmap && !prt_add_resource(res_cmap))
|
||||||
return FALSE;
|
goto theend;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3158,7 +3158,7 @@ mch_print_begin(psettings)
|
|||||||
/* There will be only one Roman font encoding to be included in the PS
|
/* There will be only one Roman font encoding to be included in the PS
|
||||||
* file. */
|
* file. */
|
||||||
if (!prt_add_resource(res_encoding))
|
if (!prt_add_resource(res_encoding))
|
||||||
return FALSE;
|
goto theend;
|
||||||
|
|
||||||
prt_dsc_noarg("EndProlog");
|
prt_dsc_noarg("EndProlog");
|
||||||
|
|
||||||
|
|||||||
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
533,
|
||||||
/**/
|
/**/
|
||||||
532,
|
532,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user