#1 Memory leak in rexxsaa.c

closed
nobody
None
5
2002-10-27
2002-07-23
Robert Mahoney
No

There is a 4K leak everytime an rexx saa call is made. For example
whenever I use the RexxUtils package,almost every call leaks 4K.

If the following line is added at line 1269 to the
RexxVariablePool function in rexxsaa.c then the memory leak goes
away.

IfcFreeMemory(Strings[1]);

The case
statement now looks like this:

case RXSHV_FETCH: /* MH 26-
12-95 */
{
IVPcode = IVPcode ? IVPcode : RX_GETVAR; /* JH
20-10-99 */
Lengths[0] = Req->shvname.strlength ;
Strings[0]
= Req->shvname.strptr ;
/* FIXME, FGC: This two lines are
unnecessary
Lengths[1] = Req->shvvalue.strlength ;

Strings[1] = Req->shvvalue.strptr ; */
Code = IfcVarPool( TSD,
IVPcode, Lengths, Strings ) ; /* JH 20-10-99 */

Req->shvret =
RXSHV_OK ;
if (Code==RX_CODE_NOVALUE)
Req-
>shvret |= RXSHV_NEWV ;
else if
(Code==RX_CODE_INVNAME)
Req->shvret |=
RXSHV_BADN ;
else if (Code!=RXSHV_OK)
exiterror(
ERR_INTERPRETER_FAILURE, 1, __FILE__, __LINE__, "" ) ;

FillReqValue( Req, Lengths[1], Strings[1] ) ;

IfcFreeMemory(Strings[1]); /* RM 22-07-02 */
TSD-
>var_indicator=0;
break ;
}

Discussion

  • Robert Mahoney
    Robert Mahoney
    2002-07-23

    Unified diff for the rexxsaa memory leak

     
    Attachments
  • Logged In: YES
    user_id=262734

    Shall have been fixed.

     
  • Mark Hessling
    Mark Hessling
    2002-10-27

    • status: open --> closed