aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2007-10-09 12:25:57 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2007-10-09 12:25:57 +0000
commitd5160894773f5be501469fd3bba06211000ca798 (patch)
tree27c0325539bd730c456d5e6e8b9be1bb92196f11 /hardinfo2/util.c
parent1435676447fae1584c9a38c3465690387bd7413a (diff)
Cleanups, plug memleak
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index 375bb995..c3022a08 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -662,16 +662,11 @@ static GSList *modules_check_deps(GSList * modules)
ShellModule *m;
gboolean found = FALSE;
- for (l = modules; l; l = l->next) {
+ for (l = modules; l && !found; l = l->next) {
m = (ShellModule *) l->data;
- gchar *name =
- g_path_get_basename(g_module_name(m->dll));
-
- if (g_str_equal(name, deps[i])) {
- found = TRUE;
- break;
- }
+ gchar *name = g_path_get_basename(g_module_name(m->dll));
+ found = g_str_equal(name, deps[i]);
g_free(name);
}