Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f2e21a163dae46630c80c6dbd8d79c4738a9fed6
Ticket: 218456ffffffffffffffffffffffffffffffffff
Memory leak in tkUnixWm.c
User & Date: nobody on 2000-10-26 01:00:36
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 598 Bug
    Version: 8.0p2
    SubmitDate: '1998-05-21'
    LastModified: '1998-09-30'
    Severity: SER
    Status: Released
    Submitter: rjohnson
    ChangedBy: rjohnson
    OS: All Unix
    OSVersion: NA
    Machine: NA
    FixedDate: '2000-10-25'
    FixedInVersion: 8.0.4
    ClosedDate: '1998-09-30'
    
    
    There is a memory leak in tkUnixWm.c in Tk8.0p2.  It appears to still
    
    be present in Tk8.1a2.  This patch should be self explanatory.
    
    
    
    Ian Taylor
    
    [email protected]
    
    
    
    *** /5g/ian/tk8.0p2/unix/tkUnixWm.c     Fri Oct 31 14:29:22 1997
    
    --- tkUnixWm.c  Tue Apr 14 17:47:21 1998
    
    *************** Tk_WmCmd(clientData, interp, argc, argv)
    
    *** 1324,1329 ****
    
    --- 1324,1332 ----
    
                interp->result = (wmPtr->iconName != NULL) ? wmPtr->iconName : "";
    
                return TCL_OK;
    
            } else {
    
    +           if (wmPtr->iconName != NULL) {
    
    +               ckfree(wmPtr->iconName);
    
    +           }
    
                wmPtr->iconName = ckalloc((unsigned) (strlen(argv[3]) + 1));
    
                strcpy(wmPtr->iconName, argv[3]);
    
                if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
    
    *************** Tk_WmCmd(clientData, interp, argc, argv)
    
    *** 1723,1728 ****
    
    --- 1726,1734 ----
    
                        : winPtr->nameUid;
    
                return TCL_OK;
    
            } else {
    
    +           if (wmPtr->title != NULL) {
    
    +               ckfree(wmPtr->title);
    
    +           }
    
                wmPtr->title = ckalloc((unsigned) (strlen(argv[3]) + 1));
    
                strcpy(wmPtr->title, argv[3]);
    
                if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
    
    
    
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.0p2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Memory leak in tkUnixWm.c"
  11. type changed to: "Bug"