[monkey-bubble: 715/753] Merge fixes for bug #116794 + one more :)
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 715/753] Merge fixes for bug #116794 + one more :)
- Date: Wed, 14 Jul 2010 22:55:48 +0000 (UTC)
commit 47f64fb9a8428df6afb9496da0d8c4645dd9274c
Author: Kjartan Maraas <kmaraas gnome org>
Date: Thu Jul 10 18:33:28 2003 +0000
Merge fixes for bug #116794 + one more :)
2003-07-10 Kjartan Maraas <kmaraas gnome org>
* libgnome/gnome-program.c: (gnome_program_postinit):
* libgnome/gnome-score.c: (gnome_score_child): Merge
fixes for bug #116794 + one more :)
libgnome/gnome-score.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/libgnome/gnome-score.c b/libgnome/gnome-score.c
index b10fa3b..26c055e 100644
--- a/libgnome/gnome-score.c
+++ b/libgnome/gnome-score.c
@@ -241,24 +241,26 @@ gnome_score_child (void)
if (strlen (realname) == 0)
realname = g_strdup (g_get_user_name ());
- while (read (STDIN_FILENO, &cmd, sizeof cmd) == sizeof(cmd))
- {
+ while (read (STDIN_FILENO, &cmd, sizeof cmd) == sizeof(cmd)) {
level = g_new (char, cmd.level);
- if (read (STDIN_FILENO, level, cmd.level) != cmd.level)
+ if (read (STDIN_FILENO, level, cmd.level) != cmd.level) {
+ g_free (realname);
return EXIT_FAILURE;
+ }
if (!*level) {
g_free(level);
level = NULL;
}
retval = log_score (defgamename, level, realname, cmd.score,
cmd.ordering);
- if (write(STDOUT_FILENO, &retval, sizeof retval) != sizeof retval)
+ if (write(STDOUT_FILENO, &retval, sizeof retval) != sizeof retval) {
+ g_free (realname);
return EXIT_FAILURE;
+ }
if (level)
g_free(level);
- }
- if (realname)
- g_free (realname);
+ }
+ g_free (realname);
return EXIT_SUCCESS;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]