Browse Source

Bugfix: ztex: Allocate final processor names on the heap, so they survive when the stack for ztex_prepare is gone

Luke Dashjr 12 years ago
parent
commit
b3c7530f35
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-ztex.c

+ 1 - 1
driver-ztex.c

@@ -371,7 +371,7 @@ static bool ztex_prepare(struct thr_info *thr)
 	}
 	
 	{
-		char fpganame[LIBZTEX_SNSTRING_LEN+3+1];
+		char *fpganame = malloc(LIBZTEX_SNSTRING_LEN+3+1);
 		sprintf(fpganame, "%s-%u", ztex->snString, cgpu->proc_id+1);
 		cgpu->name = fpganame;
 	}