while ((file = ecore_list_next(files)))
{
if (file[0] != '.')
- ecore_list_append(files2, file);
- else
- free(file);
+ ecore_list_append(files2, strdup(file));
}
ecore_list_destroy(files);
}
}
#else
therms = ecore_file_ls("/proc/acpi/thermal_zone");
- if (!therms || ecore_list_is_empty(therms))
+ if ((!therms) || ecore_list_is_empty(therms))
{
FILE *f;
}
else
{
+ if (therms) ecore_list_destroy(therms);
therms = ecore_file_ls("/sys/bus/i2c/devices");
if ((therms) && (!ecore_list_is_empty(therms)))
{
}
}
}
+ ecore_list_destroy(therms);
}
}
}
ret = 1;
fclose(f);
}
- free(name);
}
+ ecore_list_destroy(therms);
}
- if (therms) ecore_list_destroy(therms);
#endif
if (ef->conf->units == FAHRENHEIT)