comparison mcabber/src/screen.c @ 897:a05b5a16a06a

Fix memory leak in scr_LogPrint()
author Mikael Berthe <mikael@lilotux.net>
date Thu, 08 Jun 2006 21:29:09 +0200
parents 78f4971578dd
children c65b71dcda94
comparison
equal deleted inserted replaced
896:39aff86d64e7 897:a05b5a16a06a
368 wprintw(logWnd, 368 wprintw(logWnd,
369 "\n%s*Error: cannot convert string to locale.", strtimestamp); 369 "\n%s*Error: cannot convert string to locale.", strtimestamp);
370 update_panels(); 370 update_panels();
371 doupdate(); 371 doupdate();
372 g_free(buffer); 372 g_free(buffer);
373 g_free(btext);
373 return; 374 return;
374 } 375 }
375 376
376 // For the special status buffer, we need utf-8, but without the timestamp 377 // For the special status buffer, we need utf-8, but without the timestamp
377 if (flag & LPRINT_NOTUTF8) 378 if (flag & LPRINT_NOTUTF8)
404 strftime(strtimestamp, 23, "[%Y-%m-%d %H:%M:%S]", localtime(&timestamp)); 405 strftime(strtimestamp, 23, "[%Y-%m-%d %H:%M:%S]", localtime(&timestamp));
405 buffer = g_strdup_printf("%s %s\n", strtimestamp, btext); 406 buffer = g_strdup_printf("%s %s\n", strtimestamp, btext);
406 ut_WriteLog(flag, buffer); 407 ut_WriteLog(flag, buffer);
407 g_free(buffer); 408 g_free(buffer);
408 } 409 }
410 g_free(btext);
409 } 411 }
410 412
411 // scr_CreateBuddyPanel(title, dontshow) 413 // scr_CreateBuddyPanel(title, dontshow)
412 // Note: title (aka winId) can be NULL for special buffers 414 // Note: title (aka winId) can be NULL for special buffers
413 static winbuf *scr_CreateBuddyPanel(const char *title, int dont_show) 415 static winbuf *scr_CreateBuddyPanel(const char *title, int dont_show)