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


apps/apps.c:228:1: start of procedure chopup_args()
226.   #endif
227.   
228. > int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
229.   	{
230.   	int num,len,i;

apps/apps.c:233:2: 
231.   	char *p;
232.   
233. > 	*argc=0;
234.   	*argv=NULL;
235.   

apps/apps.c:234:2: 
232.   
233.   	*argc=0;
234. > 	*argv=NULL;
235.   
236.   	len=strlen(buf);

apps/apps.c:236:2: 
234.   	*argv=NULL;
235.   
236. > 	len=strlen(buf);
237.   	i=0;
238.   	if (arg->count == 0)

apps/apps.c:237:2: 
235.   
236.   	len=strlen(buf);
237. > 	i=0;
238.   	if (arg->count == 0)
239.   		{

apps/apps.c:238:6: Taking true branch
236.   	len=strlen(buf);
237.   	i=0;
238.   	if (arg->count == 0)
            ^
239.   		{
240.   		arg->count=20;

apps/apps.c:240:3: 
238.   	if (arg->count == 0)
239.   		{
240. > 		arg->count=20;
241.   		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
242.   		}

apps/apps.c:241:3: 
239.   		{
240.   		arg->count=20;
241. > 		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
242.   		}
243.   	for (i=0; i<arg->count; i++)

apps/apps.c:243:7: 
241.   		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
242.   		}
243. > 	for (i=0; i<arg->count; i++)
244.   		arg->data[i]=NULL;
245.   

apps/apps.c:243:12: Loop condition is true. Entering loop body
241.   		arg->data=(char **)Malloc(sizeof(char *)*arg->count);
242.   		}
243.   	for (i=0; i<arg->count; i++)
                  ^
244.   		arg->data[i]=NULL;
245.   

apps/apps.c:244:3: 
242.   		}
243.   	for (i=0; i<arg->count; i++)
244. > 		arg->data[i]=NULL;
245.   
246.   	num=0;
