comparison src/dialogs.c @ 37:d90f556e4aa3

[gaim-migrate @ 46] 64byte memory leak every time you import a buddy list is now fixed. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sat, 25 Mar 2000 13:45:13 +0000
parents b9e90a914e20
children f60e533679ce
comparison
equal deleted inserted replaced
36:7c6334dfab2b 37:d90f556e4aa3
1877 g_snprintf(buf, BUF_LONG / 2, "Error reading file %s", file); 1877 g_snprintf(buf, BUF_LONG / 2, "Error reading file %s", file);
1878 do_error_dialog(buf, "Error"); 1878 do_error_dialog(buf, "Error");
1879 destroy_dialog(NULL, importdialog); 1879 destroy_dialog(NULL, importdialog);
1880 importdialog = NULL; 1880 importdialog = NULL;
1881 g_free(buf); 1881 g_free(buf);
1882 g_free(first);
1882 return; 1883 return;
1883 } 1884 }
1884 1885
1885 fgets(first, 64, f); 1886 fgets(first, 64, f);
1886 1887
1887 if (!strcasecmp(first, "Config {\n")) { 1888 if (!strcasecmp(first, "Config {\n")) {
1888 destroy_dialog(NULL, importdialog); 1889 destroy_dialog(NULL, importdialog);
1889 importdialog = NULL; 1890 importdialog = NULL;
1890 g_free(buf); 1891 g_free(buf);
1892 g_free(first);
1891 return; 1893 return;
1892 } else if (buf[0] == 'm') { 1894 } else if (buf[0] == 'm') {
1893 buf2 = buf; 1895 buf2 = buf;
1894 buf = g_malloc(1025); 1896 buf = g_malloc(1025);
1895 g_snprintf(buf, 1024, "toc_set_config {%s}\n", buf2); 1897 g_snprintf(buf, 1024, "toc_set_config {%s}\n", buf2);
1918 1920
1919 destroy_dialog(NULL, importdialog); 1921 destroy_dialog(NULL, importdialog);
1920 importdialog = NULL; 1922 importdialog = NULL;
1921 1923
1922 g_free(buf); 1924 g_free(buf);
1923 1925 g_free(first);
1926
1924 } 1927 }
1925 1928
1926 void show_import_dialog() 1929 void show_import_dialog()
1927 { 1930 {
1928 char *buf = g_malloc(BUF_LEN); 1931 char *buf = g_malloc(BUF_LEN);