apps/speed.c:2393: error: NULL_DEREFERENCE
  pointer `f` last assigned on line 2392 could be null and is dereferenced by call to `fgets()` at line 2393, column 9.
Showing all 9 steps of the trace


apps/speed.c:2356:1: start of procedure do_multi()
2354.       }
2355.   
2356. > static int do_multi(int multi)
2357.   	{
2358.   	int n;

apps/speed.c:2361:2: 
2359.   	int fd[2];
2360.   	int *fds;
2361. > 	static char sep[]=":";
2362.   
2363.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2363:2: 
2361.   	static char sep[]=":";
2362.   
2363. > 	fds=malloc(multi*sizeof *fds);
2364.   	for(n=0 ; n < multi ; ++n)
2365.   		{

apps/speed.c:2364:6: 
2362.   
2363.   	fds=malloc(multi*sizeof *fds);
2364. > 	for(n=0 ; n < multi ; ++n)
2365.   		{
2366.   		pipe(fd);

apps/speed.c:2364:12: Loop condition is false. Leaving loop
2362.   
2363.   	fds=malloc(multi*sizeof *fds);
2364.   	for(n=0 ; n < multi ; ++n)
                   ^
2365.   		{
2366.   		pipe(fd);

apps/speed.c:2386:6: 
2384.   
2385.   	/* for now, assume the pipe is long enough to take all the output */
2386. > 	for(n=0 ; n < multi ; ++n)
2387.   		{
2388.   		FILE *f;

apps/speed.c:2386:12: Loop condition is true. Entering loop body
2384.   
2385.   	/* for now, assume the pipe is long enough to take all the output */
2386.   	for(n=0 ; n < multi ; ++n)
                   ^
2387.   		{
2388.   		FILE *f;

apps/speed.c:2392:3: 
2390.   		char *p;
2391.   
2392. > 		f=fdopen(fds[n],"r");
2393.   		while(fgets(buf,sizeof buf,f))
2394.   			{

apps/speed.c:2393:9: 
2391.   
2392.   		f=fdopen(fds[n],"r");
2393. > 		while(fgets(buf,sizeof buf,f))
2394.   			{
2395.   			p=strchr(buf,'\n');
