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/expand.c

    r1233 r2290  
    309309                        INTOFF;
    310310                        ifsp = psh->ifsfirst.next->next;
    311                         ckfree(psh->ifsfirst.next);
     311                        ckfree(psh, psh->ifsfirst.next);
    312312                        psh->ifsfirst.next = ifsp;
    313313                        INTON;
     
    329329                INTOFF;
    330330                ifsp = psh->ifslastp->next->next;
    331                 ckfree(psh->ifslastp->next);
     331                ckfree(psh, psh->ifslastp->next);
    332332                psh->ifslastp->next = ifsp;
    333333                INTON;
     
    463463                shfile_close(&psh->fdtab, in.fd);
    464464        if (in.buf)
    465                 ckfree(in.buf);
     465                ckfree(psh, in.buf);
    466466        if (in.jp)
    467467                psh->back_exitstatus = waitforjob(psh, in.jp);
     
    922922                        return;
    923923                }
    924                 ifsp = (struct ifsregion *)ckmalloc(sizeof (struct ifsregion));
     924                ifsp = (struct ifsregion *)ckmalloc(psh, sizeof (struct ifsregion));
    925925                psh->ifslastp->next = ifsp;
    926926        }
     
    10451045                INTOFF;
    10461046                ifsp = psh->ifsfirst.next->next;
    1047                 ckfree(psh->ifsfirst.next);
     1047                ckfree(psh, psh->ifsfirst.next);
    10481048                psh->ifsfirst.next = ifsp;
    10491049                INTON;
     
    10861086                if (psh->expdir == NULL) {
    10871087                        size_t i = strlen(str->text);
    1088                         psh->expdir = ckmalloc(i < 2048 ? 2048 : i); /* XXX */
     1088                        psh->expdir = ckmalloc(psh, i < 2048 ? 2048 : i); /* XXX */
    10891089                }
    10901090
    10911091                expmeta(psh, psh->expdir, str->text);
    1092                 ckfree(psh->expdir);
     1092                ckfree(psh, psh->expdir);
    10931093                psh->expdir = NULL;
    10941094                INTON;
Note: See TracChangeset for help on using the changeset viewer.