Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0309/6

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


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);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.