Changeset 2290 for trunk/src/kash/alias.c
- Timestamp:
- Feb 27, 2009, 5:08:07 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/alias.c
r1233 r2290 71 71 if (equal(name, ap->name)) { 72 72 INTOFF; 73 ckfree( ap->val);74 ap->val = savestr( val);73 ckfree(psh, ap->val); 74 ap->val = savestr(psh, val); 75 75 INTON; 76 76 return; … … 79 79 /* not found */ 80 80 INTOFF; 81 ap = ckmalloc( sizeof (struct alias));82 ap->name = savestr( name);81 ap = ckmalloc(psh, sizeof (struct alias)); 82 ap->name = savestr(psh, name); 83 83 /* 84 84 * XXX - HACK: in order that the parser will not finish reading the … … 99 99 */ 100 100 #ifdef notyet 101 ap->val = savestr( val);101 ap->val = savestr(psh, val); 102 102 #else /* hack */ 103 103 { 104 104 size_t len = strlen(val); 105 ap->val = ckmalloc( len + 2);105 ap->val = ckmalloc(psh, len + 2); 106 106 memcpy(ap->val, val, len); 107 107 ap->val[len] = ' '; /* fluff */ … … 135 135 INTOFF; 136 136 *app = ap->next; 137 ckfree( ap->name);138 ckfree( ap->val);139 ckfree( ap);137 ckfree(psh, ap->name); 138 ckfree(psh, ap->val); 139 ckfree(psh, ap); 140 140 INTON; 141 141 } … … 166 166 psh->atab[i] = NULL; 167 167 while (ap) { 168 ckfree( ap->name);169 ckfree( ap->val);168 ckfree(psh, ap->name); 169 ckfree(psh, ap->val); 170 170 tmp = ap; 171 171 ap = ap->next; 172 ckfree( tmp);172 ckfree(psh, tmp); 173 173 } 174 174 }
Note:
See TracChangeset
for help on using the changeset viewer.