From: "Fco. J. Ballesteros" <nemo@lsub.org>
To: 9fans@cse.psu.edu
Subject: [9fans] stringwidth leak or ignorance?
Date: Thu, 26 May 2005 12:32:07 +0200 [thread overview]
Message-ID: <14103261a9b76e26bd8bff97afbaa1ef@lsub.org> (raw)
Hi,
I've seen that at point
sys/src/libdraw/stringwidth.c:46
45 if(subfontname){
>46 if(_getsubfont(f->display, subfontname) == 0){
47 def = f->display->defaultfont;
48 if(def && f!=def)
49 f = def;
50 else
51 break;
there seems to be a leak.
_getsubfont returns a Subfont, which is not freed. However, there
seems to be some side effect, because if I free the subfont, the routine breaks.
This came from using leak on a program using stringwidth a lot. The program
shows leaks that come from this point. So I tried to fix it. I still don't know enough
of font handling to propose a course of action. Any suggestion?
If I come up with a fix, I'll send a patch anyway.
thanks
next reply other threads:[~2005-05-26 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-26 10:32 Fco. J. Ballesteros [this message]
2005-05-28 8:18 ` Rob Pike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14103261a9b76e26bd8bff97afbaa1ef@lsub.org \
--to=nemo@lsub.org \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).