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


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

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

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

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

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

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

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

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

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