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


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

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

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

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

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

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

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

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

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

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

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