Changeset 2290 for trunk/src/kash/eval.c


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

    r1233 r2290  
    614614        if (sys_path == NULL) {
    615615                if (sysctl(mib, 2, 0, &len, 0, 0) != -1 &&
    616                     (sys_path = ckmalloc(len + 5)) != NULL &&
     616                    (sys_path = ckmalloc(psh, len + 5)) != NULL &&
    617617                    sysctl(mib, 2, sys_path + 5, &len, 0, 0) != -1) {
    618618                        memcpy(sys_path, "PATH=", 5);
    619619                } else {
    620                         ckfree(sys_path);
     620                        ckfree(psh, sys_path);
    621621                        /* something to keep things happy */
    622622                        sys_path = def_path;
     
    935935                if (setjmp(jmploc.loc)) {
    936936                        if (psh->exception == EXSHELLPROC) {
    937                                 freeparam((volatile struct shparam *)
     937                                freeparam(psh, (volatile struct shparam *)
    938938                                    &saveparam);
    939939                        } else {
    940                                 freeparam(&psh->shellparam);
     940                                freeparam(psh, &psh->shellparam);
    941941                                psh->shellparam = saveparam;
    942942                        }
     
    957957                poplocalvars(psh);
    958958                psh->localvars = savelocalvars;
    959                 freeparam(&psh->shellparam);
     959                freeparam(psh, &psh->shellparam);
    960960                psh->shellparam = saveparam;
    961961                psh->handler = savehandler;
Note: See TracChangeset for help on using the changeset viewer.