From d5160894773f5be501469fd3bba06211000ca798 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Tue, 9 Oct 2007 12:25:57 +0000 Subject: Cleanups, plug memleak --- hardinfo2/util.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'hardinfo2/util.c') 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); } -- cgit v1.2.3