kernel: fix memory leak in attach [rsc] --rw-rw-r-- M 303009 glenda sys 34831 Mar 9 16:34 sys/src/9/port/chan.c /n/sourcesdump/2006/0309/plan9/sys/src/9/port/chan.c:1700,1705 - /n/sourcesdump/2006/0310/plan9/sys/src/9/port/chan.c:1700,1706 s[n] = 0; aname = s; name = s; + setmalloctag(s, pc); } while(*name){ /n/sourcesdump/2006/0309/plan9/sys/src/9/port/chan.c:1729,1735 - /n/sourcesdump/2006/0310/plan9/sys/src/9/port/chan.c:1730,1736 char* validnamedup(char *aname, int slashok) { - return validname0(aname, slashok, 1, 0); + return validname0(aname, slashok, 1, getcallerpc(&aname)); } void [rsc] --rw-rw-r-- M 303009 glenda sys 22192 Mar 9 16:34 sys/src/9/port/sysfile.c /n/sourcesdump/2006/0309/plan9/sys/src/9/port/sysfile.c:1037,1042 - /n/sourcesdump/2006/0310/plan9/sys/src/9/port/sysfile.c:1037,1043 c0 = devtab[ret]->attach((char*)&bogus); poperror(); /* spec */ + free(spec); poperror(); /* ac bc */ if(ac) cclose(ac);