--- cidr.c 2001-07-03 09:23:23.000000000 +0200 +++ patched 2003-09-03 11:11:18.000000000 +0200 @@ -142,18 +142,7 @@ } } - if( (holdaddress=malloc(strlen(argv[1])+1)) == NULL ) - { - fprintf(stderr,"holdaddress malloc() failed.\n"); - exit(EXIT_FAILURE); - } - if( (holdprefix=malloc(strlen(argv[1])+1)) == NULL ) - { - fprintf(stderr,"holdprefix malloc() failed.\n"); - exit(EXIT_FAILURE); - } - strncpy(ip[2],argv[1],18); @@ -166,7 +155,6 @@ invalid(1); - holdprefix=strtok(NULL,sep); if(holdprefix==NULL) invalid(1); @@ -413,15 +401,12 @@ hosts(i,temp,mask,hostlist,lowhost,highhost); else hosts(i,temp,mask,cidrhostlist,lowhost,highhost); - + for(i=0;i<3;i++) { free(ip[i]); } - free(holdaddress); - free(holdprefix); - return EXIT_SUCCESS; }