if (!parse->pstack)
return;
- s = FcStrBufDone (&parse->pstack->str);
+ s = FcStrBufDoneStatic (&parse->pstack->str);
if (!s)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
FcConfigMessage (parse, FcSevereError, "\"%s\": not a valid integer", s);
else
FcVStackPushInteger (parse, l);
- FcStrFree (s);
+ FcStrBufDestroy (&parse->pstack->str);
}
/*
if (!parse->pstack)
return;
- s = FcStrBufDone (&parse->pstack->str);
+ s = FcStrBufDoneStatic (&parse->pstack->str);
if (!s)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
FcConfigMessage (parse, FcSevereError, "\"%s\": not a valid double", s);
else
FcVStackPushDouble (parse, d);
- FcStrFree (s);
+ FcStrBufDestroy (&parse->pstack->str);
}
static void
if (!parse->pstack)
return;
- s = FcStrBufDone (&parse->pstack->str);
+ s = FcStrBufDoneStatic (&parse->pstack->str);
if (!s)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
return;
}
FcVStackPushBool (parse, FcConfigLexBool (parse, s));
- FcStrFree (s);
+ FcStrBufDestroy (&parse->pstack->str);
}
static FcBool
if (!parse->pstack)
return;
- s = FcStrBufDone (&parse->pstack->str);
+ s = FcStrBufDoneStatic (&parse->pstack->str);
if (!s)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
return;
}
expr = FcExprCreateString (s);
- FcStrFree (s);
+ FcStrBufDestroy (&parse->pstack->str);
if (expr)
FcVStackPushExpr (parse, FcVStackFamily, expr);
}
const FcChar8 *i;
FcBool ignore_missing = FcFalse;
- s = FcStrBufDone (&parse->pstack->str);
+ s = FcStrBufDoneStatic (&parse->pstack->str);
if (!s)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
ignore_missing = FcTrue;
if (!FcConfigParseAndLoad (parse->config, s, !ignore_missing))
parse->error = FcTrue;
- FcStrFree (s);
+ FcStrBufDestroy (&parse->pstack->str);
}
typedef struct _FcOpMap {
case FcElementFontconfig:
break;
case FcElementDir:
- data = FcStrBufDone (&parse->pstack->str);
+ data = FcStrBufDoneStatic (&parse->pstack->str);
if (!data)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
if (!FcConfigAddDir (parse->config, data))
FcConfigMessage (parse, FcSevereError, "out of memory; cannot add directory %s", data);
}
- FcStrFree (data);
+ FcStrBufDestroy (&parse->pstack->str);
break;
case FcElementCacheDir:
data = FcStrBufDone (&parse->pstack->str);
break;
case FcElementCache:
- data = FcStrBufDone (&parse->pstack->str);
+ data = FcStrBufDoneStatic (&parse->pstack->str);
if (!data)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
break;
}
/* discard this data; no longer used */
- FcStrFree (data);
+ FcStrBufDestroy (&parse->pstack->str);
break;
case FcElementInclude:
FcParseInclude (parse);