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


apps/speed.c:2405:1: start of procedure do_multi()
2403.   
2404.   #ifdef HAVE_FORK
2405. > static int do_multi(int multi)
2406.   	{
2407.   	int n;

apps/speed.c:2410:2: 
2408.   	int fd[2];
2409.   	int *fds;
2410. > 	static char sep[]=":";
2411.   
2412.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2412:2: 
2410.   	static char sep[]=":";
2411.   
2412. > 	fds=malloc(multi*sizeof *fds);
2413.   	for(n=0 ; n < multi ; ++n)
2414.   		{

apps/speed.c:2413:6: 
2411.   
2412.   	fds=malloc(multi*sizeof *fds);
2413. > 	for(n=0 ; n < multi ; ++n)
2414.   		{
2415.   		pipe(fd);

apps/speed.c:2413:12: Loop condition is false. Leaving loop
2411.   
2412.   	fds=malloc(multi*sizeof *fds);
2413.   	for(n=0 ; n < multi ; ++n)
                   ^
2414.   		{
2415.   		pipe(fd);

apps/speed.c:2435:6: 
2433.   
2434.   	/* for now, assume the pipe is long enough to take all the output */
2435. > 	for(n=0 ; n < multi ; ++n)
2436.   		{
2437.   		FILE *f;

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

apps/speed.c:2441:3: 
2439.   		char *p;
2440.   
2441. > 		f=fdopen(fds[n],"r");
2442.   		while(fgets(buf,sizeof buf,f))
2443.   			{

apps/speed.c:2442:9: 
2440.   
2441.   		f=fdopen(fds[n],"r");
2442. > 		while(fgets(buf,sizeof buf,f))
2443.   			{
2444.   			p=strchr(buf,'\n');
