Hi Emil,
Thanks for the review, I indeed miss the dirent free.
>> +/** \brief Parse configuration files in a directory */
>> +static void
>> +parseConfigDir(struct OptConfData *data, const char *dirname)
>> +{
>> + int i, count;
>> + struct dirent **entries = NULL;
>> +
>> + count = scandir(dirname, &entries, scandir_filter, alphasort);
>> + if (count < 0)
> We have nothing to do with 0 entries, so make it < 1?
> Or just keep it as-is, if entries still needs to be free'd when 0.
free() is OK for NULL input, so when 0, free is not necessary.
Either way is OK.
Regards,
Qiang
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev