Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
L
libXcursor
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • xorg
  • lib
  • libXcursor
  • Issues
  • #2

Closed (moved)
Open
Opened Sep 06, 2016 by Bugzilla Migration User@bugzilla-migration

XFreePixmap() memory leak with bitmaps

Submitted by neo..@..il.com

Assigned to Xorg Project Team

Link to original bug (#97617)

Description

int main () {
    const    char* NIL = 0 ;
    Display* dpy           ;
    Window   w             ;
    Pixmap   bm0           ;
    Colormap cmap          ;
    uint32_t white         ;
    uint32_t black         ;
    char     data[8] = {0} ;
    dpy     = XOpenDisplay(NIL) ;
    if (dpy == 0) throw 0x01 ;
    white   = WhitePixel (dpy,DefaultScreen(dpy)) ;
    black   = BlackPixel (dpy,DefaultScreen(dpy)) ;
    w       = XCreateSimpleWindow(dpy, RootWindow(dpy,0), 0,0, 640,480, 0, 0, black);

    bm0  = XCreatePixmap   (dpy,w,64,64,1 ) ;          //leaks
    // bm0  = XCreatePixmap   (dpy,w,64,64,24) ;       //doesn' leak
    // bm0  = XCreateBitmapFromData (dpy,w,data,8,8) ; //leaks

    XFreePixmap  (dpy,bm0) ;
    XDestroyWindow(dpy,w) ;
    XCloseDisplay (dpy)   ;
    return 0 ;
}
Edited Aug 17, 2018 by Alan Coopersmith
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xorg/lib/libxcursor#2