text: font: pango/freetype2: fix correctly freeing font faces

Whoops, obvious typo. We need to free the face if the refcount drops to
zero and not if it is non-zero.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-08-11 14:54:43 +02:00
parent 21092ba70f
commit d9e7137861
2 changed files with 2 additions and 2 deletions

View File

@ -519,7 +519,7 @@ static void manager_put_face(struct face *face)
{
manager_lock();
if (--face->ref) {
if (!--face->ref) {
kmscon_dlist_unlink(&face->list);
kmscon_hashtable_free(face->glyphs);
pthread_mutex_destroy(&face->glyph_lock);

View File

@ -343,7 +343,7 @@ static void manager_put_face(struct face *face)
{
manager_lock();
if (--face->ref) {
if (!--face->ref) {
kmscon_dlist_unlink(&face->list);
kmscon_hashtable_free(face->glyphs);
pthread_mutex_destroy(&face->glyph_lock);