some clean-ups
@@ -1437,7 +1437,7 @@ while(1)
}
zeiger = essidlistin +essidlistincount;
}
-fclose(fh_essidlistin);
+if(fh_essidlistin != NULL) fclose(fh_essidlistin);
qsort(essidlistin, essidlistincount, ESSIDLIST_SIZE, sort_essidlistin);
qsort(hashlist, pmkideapolcount, HASHLIST_SIZE, sort_maclist_by_essidlen);
@@ -1450,7 +1450,6 @@ if(pmkideapoloutname != NULL)
return;
}
}
-
zeiger = essidlistin;
zeigerhash = hashlist;
o = 0;
@@ -1469,7 +1468,6 @@ for(i = 0; i < essidlistincount; i++)
o++;
}
}
-
if(fh_pmkideapol != NULL) fclose(fh_pmkideapol);
if(pmkideapoloutname != NULL)
{
@@ -1478,7 +1476,7 @@ if(pmkideapoloutname != NULL)
if(statinfo.st_size == 0) remove(pmkideapoloutname);
}
}
-free(essidlistin);
+if(essidlistin != NULL) free(essidlistin);
return;
}
/*===========================================================================*/
