Browse Source

Plan 9 from Bell Labs 2006-12-11

David du Colombier 14 years ago
parent
commit
eff372d47e
4 changed files with 6 additions and 6 deletions
  1. 1 0
      dist/replica/_plan9.db
  2. 1 1
      dist/replica/plan9.db
  3. 1 0
      dist/replica/plan9.log
  4. 3 5
      sys/src/9/port/devsrv.c

+ 1 - 0
dist/replica/_plan9.db

@@ -15674,3 +15674,4 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+sys/src/9/port/devsrv.c - 664 sys sys 1165810571 5711

+ 1 - 1
dist/replica/plan9.db

@@ -8109,7 +8109,7 @@ sys/src/9/port/devroot.c - 664 sys sys 1146151714 4242
 sys/src/9/port/devsd.c - 664 sys sys 1155995769 30859
 sys/src/9/port/devsdp.c - 664 sys sys 1057323393 44800
 sys/src/9/port/devsegment.c - 664 sys sys 1131289891 9610
-sys/src/9/port/devsrv.c - 664 sys sys 1163030369 5728
+sys/src/9/port/devsrv.c - 664 sys sys 1165810571 5711
 sys/src/9/port/devssl.c - 664 sys sys 1146151714 26121
 sys/src/9/port/devtinyfs.c - 664 sys sys 1015278339 15347
 sys/src/9/port/devtls.c - 664 sys sys 1146151715 45214

+ 1 - 0
dist/replica/plan9.log

@@ -31788,3 +31788,4 @@
 1165624206 10 c sys/man/8/gpsfs - 664 sys sys 1165623047 4918
 1165624206 11 c sys/man/8/httpd - 664 sys sys 1165623004 6865
 1165624206 12 c sys/man/8/tlssrv - 664 sys sys 1165623041 2589
+1165811406 0 c sys/src/9/port/devsrv.c - 664 sys sys 1165810571 5711

+ 3 - 5
sys/src/9/port/devsrv.c

@@ -150,18 +150,16 @@ srvcreate(Chan *c, char *name, int omode, ulong perm)
 
 	sp = smalloc(sizeof *sp);
 	sname = smalloc(strlen(name)+1);
-	if(sp == nil || sname == nil) {
-		free(sp);
-		free(sname);
-		error(Enomem);
-	}
 
 	qlock(&srvlk);
 	if(waserror()){
 		free(sp);
+		free(sname);
 		qunlock(&srvlk);
 		nexterror();
 	}
+	if(sp == nil || sname == nil)
+		error(Enomem);
 	if(srvlookup(name, -1))
 		error(Eexist);