X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/56f9bb799e852bb2ff797399c41863d8593b5968..91715e2f198242d378e33453014dd004fcf9f47e:/src/xbt/log.c diff --git a/src/xbt/log.c b/src/xbt/log.c index d00f8601fd..b4e3010b4c 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -1060,13 +1060,11 @@ void xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay) cat->name); xbt_log_appender_set(cat, xbt_log_appender_file_new(NULL)); } - if (cat->layout && cat != &_XBT_LOGV(root)) { - /* better leak the default layout than check every categories to - change it */ + if (cat->layout) { if (cat->layout->free_) { cat->layout->free_(cat->layout); - free(cat->layout); } + free(cat->layout); } cat->layout = lay; xbt_log_additivity_set(cat, 0);