Ignore:
Timestamp:
Feb 27, 2009, 5:08:07 AM (16 years ago)
Author:
bird
Message:

kash: malloc/free/friends gets a psh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/parser.c

    r1236 r2290  
    11511151        psh->wordtext = out;
    11521152        if (dblquotep != NULL)
    1153             ckfree(dblquotep);
     1153            ckfree(psh, dblquotep);
    11541154        return psh->lasttoken = TWORD;
    11551155/* end of readtoken routine */
     
    13471347                        varnest++;
    13481348                        if (varnest >= maxnest) {
    1349                                 dblquotep = ckrealloc(dblquotep, maxnest / 8);
     1349                                dblquotep = ckrealloc(psh, dblquotep, maxnest / 8);
    13501350                                dblquotep[(maxnest / 32) - 1] = 0;
    13511351                                maxnest += 32;
     
    13801380        if (setjmp(jmploc.loc)) {
    13811381                if (str)
    1382                         ckfree(str);
     1382                        ckfree(psh, str);
    13831383                psh->parsebackquote = 0;
    13841384                psh->handler = savehandler;
     
    13891389        savelen = (int)(out - stackblock(psh));
    13901390        if (savelen > 0) {
    1391                 str = ckmalloc(savelen);
     1391                str = ckmalloc(psh, savelen);
    13921392                memcpy(str, stackblock(psh), savelen);
    13931393        }
     
    14951495                STADJUST(psh, savelen, out);
    14961496                INTOFF;
    1497                 ckfree(str);
     1497                ckfree(psh, str);
    14981498                str = NULL;
    14991499                INTON;
Note: See TracChangeset for help on using the changeset viewer.