Mercurial > pidgin.yaz
comparison pidgin/gtkmain.c @ 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 | 634b96915d2e |
children | 0973688f4b74 |
comparison
equal
deleted
inserted
replaced
16130:b4a112ceb248 | 16131:f0c6a91bfd67 |
---|---|
600 opt_version = TRUE; | 600 opt_version = TRUE; |
601 break; | 601 break; |
602 case '?': /* show terse help */ | 602 case '?': /* show terse help */ |
603 default: | 603 default: |
604 show_usage(argv[0], TRUE); | 604 show_usage(argv[0], TRUE); |
605 #ifdef HAVE_SIGNAL_H | |
606 g_free(segfault_message); | |
607 #endif | |
605 return 0; | 608 return 0; |
606 break; | 609 break; |
607 } | 610 } |
608 } | 611 } |
609 | 612 |
610 /* show help message */ | 613 /* show help message */ |
611 if (opt_help) { | 614 if (opt_help) { |
612 show_usage(argv[0], FALSE); | 615 show_usage(argv[0], FALSE); |
616 #ifdef HAVE_SIGNAL_H | |
617 g_free(segfault_message); | |
618 #endif | |
613 return 0; | 619 return 0; |
614 } | 620 } |
615 /* show version message */ | 621 /* show version message */ |
616 if (opt_version) { | 622 if (opt_version) { |
617 printf(PIDGIN_NAME " %s\n", VERSION); | 623 printf(PIDGIN_NAME " %s\n", VERSION); |
624 #ifdef HAVE_SIGNAL_H | |
625 g_free(segfault_message); | |
626 #endif | |
618 return 0; | 627 return 0; |
619 } | 628 } |
620 | 629 |
621 /* set a user-specified config directory */ | 630 /* set a user-specified config directory */ |
622 if (opt_config_dir_arg != NULL) { | 631 if (opt_config_dir_arg != NULL) { |
641 | 650 |
642 printf(PIDGIN_NAME " %s\n", VERSION); | 651 printf(PIDGIN_NAME " %s\n", VERSION); |
643 | 652 |
644 g_warning("cannot open display: %s", display ? display : "unset"); | 653 g_warning("cannot open display: %s", display ? display : "unset"); |
645 g_free(display); | 654 g_free(display); |
655 #ifdef HAVE_SIGNAL_H | |
656 g_free(segfault_message); | |
657 #endif | |
646 | 658 |
647 return 1; | 659 return 1; |
648 } | 660 } |
649 | 661 |
650 #ifdef _WIN32 | 662 #ifdef _WIN32 |
665 | 677 |
666 if (!purple_core_init(PIDGIN_UI)) { | 678 if (!purple_core_init(PIDGIN_UI)) { |
667 fprintf(stderr, | 679 fprintf(stderr, |
668 "Initialization of the " PIDGIN_NAME " core failed. Dumping core.\n" | 680 "Initialization of the " PIDGIN_NAME " core failed. Dumping core.\n" |
669 "Please report this!\n"); | 681 "Please report this!\n"); |
682 #ifdef HAVE_SIGNAL_H | |
683 g_free(segfault_message); | |
684 #endif | |
670 abort(); | 685 abort(); |
671 } | 686 } |
672 | 687 |
673 /* TODO: Move blist loading into purple_blist_init() */ | 688 /* TODO: Move blist loading into purple_blist_init() */ |
674 purple_set_blist(purple_blist_new()); | 689 purple_set_blist(purple_blist_new()); |