Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 96dc99bc1a83518d0da03e5c9a29c1cb69c0ca3e
Ticket: 1717186fffffffffffffffffffffffffffffffff
lsort can leak memory in error case
User & Date: afredd on 2007-05-11 12:49:48
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    The listObj is not free'd in the error case where
    the given -command string is not a valid list:
    
    Consider:
    
    proc A {} {
     set lst [lrepeat 999 999]
     catch {
      lsort -command "foo \{" $lst
     }
    }
    while 1 { A } ;# leaks
    
    
    Just needs a
    
     Tcl_DecrRefCount(listObj);
    
    in the 
    
     if (Tcl_ListObjAppendElement(interp, newCommandPtr, newObjPtr) != TCL_OK)
    
    block.
    
    
    
  4. foundin changed to: "obsolete: 8.5a6"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "afredd"
  10. subsystem changed to: "17. Commands I-L"
  11. title changed to: "lsort can leak memory in error case"
  12. type changed to: "Bug"