vt: fix dropping reference on deallocation
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 21 Jul 2012 18:45:30 +0000 (20:45 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 21 Jul 2012 18:45:30 +0000 (20:45 +0200)
The vt allocation returns a referenced object so deallocation should
correctly drop it again. We already depend on this behavior so fix it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/uterm_vt.c

index ef70468..fbe50e5 100644 (file)
@@ -181,6 +181,7 @@ void uterm_vt_deallocate(struct uterm_vt *vt)
        }
        kmscon_dlist_unlink(&vt->list);
        vt->vtm = NULL;
+       uterm_vt_unref(vt);
 }
 
 void uterm_vt_ref(struct uterm_vt *vt)