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


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

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

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

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

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

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

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

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

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