apps/apps.c:250: error: NULL_DEREFERENCE
  pointer `arg->data` last assigned on line 247 could be null and is dereferenced at line 250, column 3.
Showing all 11 steps of the trace


apps/apps.c:234:1: start of procedure chopup_args()
232.   #endif
233.   
234. > int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
235.   	{
236.   	int num,len,i;

apps/apps.c:239:2: 
237.   	char *p;
238.   
239. > 	*argc=0;
240.   	*argv=NULL;
241.   

apps/apps.c:240:2: 
238.   
239.   	*argc=0;
240. > 	*argv=NULL;
241.   
242.   	len=strlen(buf);

apps/apps.c:242:2: 
240.   	*argv=NULL;
241.   
242. > 	len=strlen(buf);
243.   	i=0;
244.   	if (arg->count == 0)

apps/apps.c:243:2: 
241.   
242.   	len=strlen(buf);
243. > 	i=0;
244.   	if (arg->count == 0)
245.   		{

apps/apps.c:244:6: Taking true branch
242.   	len=strlen(buf);
243.   	i=0;
244.   	if (arg->count == 0)
            ^
245.   		{
246.   		arg->count=20;

apps/apps.c:246:3: 
244.   	if (arg->count == 0)
245.   		{
246. > 		arg->count=20;
247.   		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
248.   		}

apps/apps.c:247:3: 
245.   		{
246.   		arg->count=20;
247. > 		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
248.   		}
249.   	for (i=0; i<arg->count; i++)

apps/apps.c:249:7: 
247.   		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
248.   		}
249. > 	for (i=0; i<arg->count; i++)
250.   		arg->data[i]=NULL;
251.   

apps/apps.c:249:12: Loop condition is true. Entering loop body
247.   		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
248.   		}
249.   	for (i=0; i<arg->count; i++)
                  ^
250.   		arg->data[i]=NULL;
251.   

apps/apps.c:250:3: 
248.   		}
249.   	for (i=0; i<arg->count; i++)
250. > 		arg->data[i]=NULL;
251.   
252.   	num=0;
