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


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

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

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

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

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

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

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

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

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