Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0d2e77b366dbb69133208c0f3462bf42a1b59a2b
Ticket: 517503ffffffffffffffffffffffffffffffffff
mem leak in Tcl_GetsObjCmd ?
User & Date: msofer on 2002-02-14 13:32:06
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    While looking through the sources, I have stumbled
    accross something that looks to me like a possible
    memory leak. I may be missing something though.
    
    The issue is in function Tcl_GetsObjCmd (tclIOCmd.c):
    on line 253 we see
        if (objc == 3) {
    Tcl_DecrRefCount(linePtr);
        }
    I think that linePtr should be Tcl_DecrRefCount'ed also
    when objc is not equal to 3.
    
    As it is, I suspect the linePtr object will be leaked
    when there is an error reading the channel in
                      set myVar [gets $chan]
    i.e., with (objc == 2)
    
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "24. Channel Commands"
  10. title changed to: "mem leakin Tcl_GetsObjCmd ?"
  11. type changed to: "Bug"