Reviewed-by: Alan Coopersmith <[email protected]>

Jeff Smith wrote:
> Running xvinfo through valgrind (with no arguments to xvinfo) and
> 'no adaptors present' produced "still reachable: 41,247 bytes in 31 blocks."
> This patch reduces this to "still reachable: 35 bytes in 2 blocks."
> 
> Signed-off-by: Jeff Smith <[email protected]>
> ---
>  xvinfo.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/xvinfo.c b/xvinfo.c
> index ea3b662..46c143b 100644
> --- a/xvinfo.c
> +++ b/xvinfo.c
> @@ -58,6 +58,7 @@ int main(int argc, char *argv[])
>      {
>       fprintf(stderr, "xvinfo: No X-Video Extension on %s\n",
>                          (disname != NULL) ? disname : XDisplayName(NULL));
> +     XCloseDisplay(dpy);
>       exit(0);
>      } 
>      else
> @@ -284,5 +285,6 @@ int main(int argc, char *argv[])
>  
>       XvFreeAdaptorInfo(ainfo);
>      }
> +    XCloseDisplay(dpy);
>      return 1;
>  }

-- 
        -Alan Coopersmith-           [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to