diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-07-06 16:06:06 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-07-06 16:06:06 +0000 |
commit | 654c87a6e928e845952a841302cb6bd5086d1fba (patch) | |
tree | 81ad7f46f4a175f3a7d7c9658d25bed1c99455d6 /hardinfo2 | |
parent | aecade30c040b636dd63e551fb47ada4440a16a8 (diff) |
More cleanups.
Diffstat (limited to 'hardinfo2')
-rw-r--r-- | hardinfo2/computer.c | 14 | ||||
-rw-r--r-- | hardinfo2/util.c | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/hardinfo2/computer.c b/hardinfo2/computer.c index ef7631f8..151642eb 100644 --- a/hardinfo2/computer.c +++ b/hardinfo2/computer.c @@ -212,12 +212,13 @@ void scan_users(gboolean reload) gchar *callback_summary() { - gchar *processor_name = - module_call_method("devices::getProcessorName"), *alsa_cards = - computer_get_alsacards(computer), *input_devices = - module_call_method("devices::getInputDevices"), *printers = - module_call_method("devices::getPrinters"), *storage_devices = - module_call_method("devices::getStorageDevices"), *summary; + gchar *processor_name, *alsa_cards, *input_devices, *printers, *storage_devices, *summary; + + processor_name = module_call_method("devices::getProcessorName"); + alsa_cards = computer_get_alsacards(computer); + input_devices = module_call_method("devices::getInputDevices"); + printers = module_call_method("devices::getPrinters"); + storage_devices = module_call_method("devices::getStorageDevices"); summary = g_strdup_printf("[$ShellParam$]\n" "UpdateInterval$Memory=1000\n" @@ -247,6 +248,7 @@ gchar *callback_summary() computer->display->vendor, alsa_cards, input_devices, printers, storage_devices); + g_free(processor_name); g_free(alsa_cards); g_free(input_devices); diff --git a/hardinfo2/util.c b/hardinfo2/util.c index 16e586fd..bf8c3f57 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -996,11 +996,11 @@ gchar *h_strdup_cprintf(const gchar * format, gchar * source, ...) if (source) { retn = g_strconcat(source, buffer, NULL); g_free(buffer); + g_free(source); } else { retn = buffer; } - g_free(source); return retn; } |