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


apps/speed.c:2422:1: start of procedure do_multi()
2420.   
2421.   #ifdef HAVE_FORK
2422. > static int do_multi(int multi)
2423.   	{
2424.   	int n;

apps/speed.c:2427:2: 
2425.   	int fd[2];
2426.   	int *fds;
2427. > 	static char sep[]=":";
2428.   
2429.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2429:2: 
2427.   	static char sep[]=":";
2428.   
2429. > 	fds=malloc(multi*sizeof *fds);
2430.   	for(n=0 ; n < multi ; ++n)
2431.   		{

apps/speed.c:2430:6: 
2428.   
2429.   	fds=malloc(multi*sizeof *fds);
2430. > 	for(n=0 ; n < multi ; ++n)
2431.   		{
2432.   		pipe(fd);

apps/speed.c:2430:12: Loop condition is false. Leaving loop
2428.   
2429.   	fds=malloc(multi*sizeof *fds);
2430.   	for(n=0 ; n < multi ; ++n)
                   ^
2431.   		{
2432.   		pipe(fd);

apps/speed.c:2452:6: 
2450.   
2451.   	/* for now, assume the pipe is long enough to take all the output */
2452. > 	for(n=0 ; n < multi ; ++n)
2453.   		{
2454.   		FILE *f;

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

apps/speed.c:2458:3: 
2456.   		char *p;
2457.   
2458. > 		f=fdopen(fds[n],"r");
2459.   		while(fgets(buf,sizeof buf,f))
2460.   			{

apps/speed.c:2459:9: 
2457.   
2458.   		f=fdopen(fds[n],"r");
2459. > 		while(fgets(buf,sizeof buf,f))
2460.   			{
2461.   			p=strchr(buf,'\n');
