comparison src/pounce.c @ 5940:94ad4d45346a

[gaim-migrate @ 6380] memleak fixen committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 22 Jun 2003 16:27:43 +0000
parents 9e54bb2ee3b5
children a4f2aba0848d
comparison
equal deleted inserted replaced
5939:3014de25a8a4 5940:94ad4d45346a
670 670
671 if (!g_file_get_contents(filename, &contents, &length, &error)) { 671 if (!g_file_get_contents(filename, &contents, &length, &error)) {
672 gaim_debug(GAIM_DEBUG_ERROR, "pounces", 672 gaim_debug(GAIM_DEBUG_ERROR, "pounces",
673 "Error reading pounces: %s\n", error->message); 673 "Error reading pounces: %s\n", error->message);
674 674
675 g_free(filename);
675 g_error_free(error); 676 g_error_free(error);
676 677
677 pounces_loaded = TRUE; 678 pounces_loaded = TRUE;
678 return FALSE; 679 return FALSE;
679 } 680 }
684 parser_data, free_parser_data); 685 parser_data, free_parser_data);
685 686
686 if (!g_markup_parse_context_parse(context, contents, length, NULL)) { 687 if (!g_markup_parse_context_parse(context, contents, length, NULL)) {
687 g_markup_parse_context_free(context); 688 g_markup_parse_context_free(context);
688 g_free(contents); 689 g_free(contents);
690 g_free(filename);
689 691
690 pounces_loaded = TRUE; 692 pounces_loaded = TRUE;
691 693
692 return FALSE; 694 return FALSE;
693 } 695 }
696 gaim_debug(GAIM_DEBUG_ERROR, "pounces", "Error parsing %s\n", 698 gaim_debug(GAIM_DEBUG_ERROR, "pounces", "Error parsing %s\n",
697 filename); 699 filename);
698 700
699 g_markup_parse_context_free(context); 701 g_markup_parse_context_free(context);
700 g_free(contents); 702 g_free(contents);
703 g_free(filename);
701 pounces_loaded = TRUE; 704 pounces_loaded = TRUE;
702 705
703 return FALSE; 706 return FALSE;
704 } 707 }
705 708
706 g_markup_parse_context_free(context); 709 g_markup_parse_context_free(context);
707 g_free(contents); 710 g_free(contents);
708
709 g_free(filename); 711 g_free(filename);
710 712
711 pounces_loaded = TRUE; 713 pounces_loaded = TRUE;
712 714
713 return TRUE; 715 return TRUE;