Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1119/3

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


Fix memory leak.
 [rsc] --rw-rw-r-- M 107020 glenda sys 6651 Nov 19 19:47 sys/src/lib9p/file.c
	/n/sourcesdump/2005/1119/plan9/sys/src/lib9p/file.c:310,322 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/lib9p/file.c:310,320
	  	f = allocfile();
	  	f->name = estrdup9p("/");
	  	if(uid == nil){
	- 		if(uid = getuser())
	- 			uid = estrdup9p(uid);
	+ 		uid = getuser();
	+ 		if(uid == nil)
	+ 			uid = "none";
	  	}
	- 	if(uid == nil)
	- 		uid = estrdup9p("none");
	- 	else
	- 		uid = estrdup9p(uid);
	+ 	uid = estrdup9p(uid);
	  
	  	if(gid == nil)
	  		gid = estrdup9p(uid);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].