From: Chris Wilson Subject: Re: [PATCH] Destroy screen pixmap on screen close. Date: Fri, 02 Jul 2010 09:24:07 +0100 Message-ID: <89k83a$8ps5en@azsmga001.ch.intel.com> References: <1277992600-7721-1-git-send-email-keithp@keithp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1249069923==" Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 381489E7D7 for ; Fri, 2 Jul 2010 01:24:11 -0700 (PDT) In-Reply-To: <1277992600-7721-1-git-send-email-keithp@keithp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Keith Packard , intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.sourceforge.net List-Id: intel-gfx@lists.freedesktop.org --===============1249069923== Content-Type: text/plain On Thu, 1 Jul 2010 09:56:40 -0400, Keith Packard wrote: > This avoids a memory leak on server reset. > > Signed-off-by: Keith Packard > --- > uxa/uxa.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/uxa/uxa.c b/uxa/uxa.c > index a9a705c..dcfaaa9 100644 > --- a/uxa/uxa.c > +++ b/uxa/uxa.c > @@ -1,7 +1,7 @@ > /* > - * Copyright © 2001 Keith Packard > + * Copyright © 2001 Keith Packard > * > - * Partly based on code that is Copyright © The XFree86 Project Inc. > + * Partly based on code that is Copyright © The XFree86 Project Inc. > * > * Permission to use, copy, modify, distribute, and sell this software and its > * documentation for any purpose is hereby granted without fee, provided that > @@ -381,6 +381,8 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen) > > uxa_glyphs_fini(pScreen); > > + (void) (*pScreen->DestroyPixmap) (pScreen->devPrivate); > + pScreen->devPrivate = NULL; This looks like the responsibility of miCloseScreen(). Are we failing to chain up properly? Currently we have uxa_close_screen -> PictureCloseScreen -> fbCloseScreen and fbCloseScreen supersedes miCloseScreen. So should it not be fbCloseScreen that calls miCloseScreen, since fb has taken over the management of the mi interface? -- Chris Wilson, Intel Open Source Technology Centre --===============1249069923== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1249069923==--