[PATCH libXft] Remove an extraneous FcPatternDestroy in XftFontOpenInfo
Alan Coopersmith
alan.coopersmith at oracle.com
Mon Oct 3 09:53:26 PDT 2011
On 10/ 2/11 02:55 PM, Jeremy Huddleston wrote:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=5745
>
> Signed-off-by: Jeremy Huddleston<jeremyhu at apple.com>
> ---
> src/xftfreetype.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/src/xftfreetype.c b/src/xftfreetype.c
> index 3f8dfef..1c5967a 100644
> --- a/src/xftfreetype.c
> +++ b/src/xftfreetype.c
> @@ -798,7 +798,6 @@ XftFontOpenInfo (Display *dpy,
> {
> if (!font->ref++)
> --info->num_unref_fonts;
> - FcPatternDestroy (pattern);
> return&font->public;
> }
>
I'm not sure, since if it passes that point, it saves the pattern in
the newly created font's font->public.pattern and then does the
FcPatternDestroy of it in XftFontDestroy.
Perhaps we just need to document that the pattern passed to XftFontOpenInfo
becomes the exclusive property of Xft and the caller is not allowed to use
it any more?
(Though it seems XftFontOpenInfo is missing from the function list in the
Xft man page, so needs more love than that.)
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list