On Wednesday 24 of April 2013 17:15:50 Jiri Moskovcak wrote:
+int get_problems_count(const GList *paths) +{
- GList *pths = NULL;
- if (!paths)
- {
load_abrt_conf();
pths = g_list_append(pths, xstrdup(g_settings_dump_location));
//no needed, we don't steal directories anymore
pths = g_list_append(pths, concat_path_file(g_get_user_cache_dir(),
"abrt/spool")); + free_abrt_conf_data();
Leaking pths at all.
But I would rather move this code branch to a standalone function and use the new function at all places we do this. (cmd_list, cmd_report, src/applet/applet.c)
- }
- int problem_count = 0;
Why not unsigned? :)
- g_list_foreach(pths, (GFunc)count_problems_in_dir, &problem_count);
- return problem_count;
+} \ No newline at end of file