Skip to content

Commit

Permalink
More cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed Jul 6, 2007
1 parent aecade3 commit 654c87a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions hardinfo2/computer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion hardinfo2/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 654c87a

Please sign in to comment.