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


apps/speed.c:2396:1: start of procedure do_multi()
2394.   
2395.   #ifdef HAVE_FORK
2396. > static int do_multi(int multi)
2397.   	{
2398.   	int n;

apps/speed.c:2401:2: 
2399.   	int fd[2];
2400.   	int *fds;
2401. > 	static char sep[]=":";
2402.   
2403.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2403:2: 
2401.   	static char sep[]=":";
2402.   
2403. > 	fds=malloc(multi*sizeof *fds);
2404.   	for(n=0 ; n < multi ; ++n)
2405.   		{

apps/speed.c:2404:6: 
2402.   
2403.   	fds=malloc(multi*sizeof *fds);
2404. > 	for(n=0 ; n < multi ; ++n)
2405.   		{
2406.   		pipe(fd);

apps/speed.c:2404:12: Loop condition is false. Leaving loop
2402.   
2403.   	fds=malloc(multi*sizeof *fds);
2404.   	for(n=0 ; n < multi ; ++n)
                   ^
2405.   		{
2406.   		pipe(fd);

apps/speed.c:2426:6: 
2424.   
2425.   	/* for now, assume the pipe is long enough to take all the output */
2426. > 	for(n=0 ; n < multi ; ++n)
2427.   		{
2428.   		FILE *f;

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

apps/speed.c:2432:3: 
2430.   		char *p;
2431.   
2432. > 		f=fdopen(fds[n],"r");
2433.   		while(fgets(buf,sizeof buf,f))
2434.   			{

apps/speed.c:2433:9: 
2431.   
2432.   		f=fdopen(fds[n],"r");
2433. > 		while(fgets(buf,sizeof buf,f))
2434.   			{
2435.   			p=strchr(buf,'\n');
