comparison plugins/history.c @ 3655:1861b94f4da1

[gaim-migrate @ 3784] history plugin segfault fix courtesy of jstuart committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 12 Oct 2002 18:48:33 +0000
parents a9cf9903bd74
children 0283b00f5424
comparison
equal deleted inserted replaced
3654:ac2e1da8879f 3655:1861b94f4da1
14 void historize (char *name, void *data) 14 void historize (char *name, void *data)
15 { 15 {
16 struct conversation *c = find_conversation(name); 16 struct conversation *c = find_conversation(name);
17 struct stat st; 17 struct stat st;
18 FILE *fd; 18 FILE *fd;
19 char *userdir = gaim_user_dir(); 19 char *userdir = g_strdup(gaim_user_dir());
20 char *logfile = g_strdup_printf("%s.log", normalize(name)); 20 char *logfile = g_strdup_printf("%s.log", normalize(name));
21 char *path = g_build_filename(userdir, "logs", logfile, NULL); 21 char *path = g_build_filename(userdir, "logs", logfile, NULL);
22 char buf[HISTORY_SIZE+1]; 22 char buf[HISTORY_SIZE+1];
23 char *tmp; 23 char *tmp;
24 int size; 24 int size;