changeset 16131:f0c6a91bfd67

Free segfault_message when Pidgin exits abnormally
author Mark Doliner <mark@kingant.net>
date Sun, 15 Apr 2007 17:06:53 +0000
parents b4a112ceb248
children 9699941af4c4
files pidgin/gtkmain.c
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkmain.c	Sun Apr 15 17:05:44 2007 +0000
+++ b/pidgin/gtkmain.c	Sun Apr 15 17:06:53 2007 +0000
@@ -602,6 +602,9 @@
 		case '?':	/* show terse help */
 		default:
 			show_usage(argv[0], TRUE);
+#ifdef HAVE_SIGNAL_H
+			g_free(segfault_message);
+#endif
 			return 0;
 			break;
 		}
@@ -610,11 +613,17 @@
 	/* show help message */
 	if (opt_help) {
 		show_usage(argv[0], FALSE);
+#ifdef HAVE_SIGNAL_H
+		g_free(segfault_message);
+#endif
 		return 0;
 	}
 	/* show version message */
 	if (opt_version) {
 		printf(PIDGIN_NAME " %s\n", VERSION);
+#ifdef HAVE_SIGNAL_H
+		g_free(segfault_message);
+#endif
 		return 0;
 	}
 
@@ -643,6 +652,9 @@
 
 		g_warning("cannot open display: %s", display ? display : "unset");
 		g_free(display);
+#ifdef HAVE_SIGNAL_H
+		g_free(segfault_message);
+#endif
 
 		return 1;
 	}
@@ -667,6 +679,9 @@
 		fprintf(stderr,
 				"Initialization of the " PIDGIN_NAME " core failed. Dumping core.\n"
 				"Please report this!\n");
+#ifdef HAVE_SIGNAL_H
+		g_free(segfault_message);
+#endif
 		abort();
 	}