Fix memory leak in src/output/table.c
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Jun 2020 05:27:25 +0000 (07:27 +0200)
src/output/table.c

index 01ab1bffc0acef9c4b1b10a5957776a294a7081c..31348a46a70d53b32aa6c3e7fdd8cd9bb2c5eea4 100644 (file)
@@ -176,7 +176,7 @@ struct table *
 table_from_string (const char *text)
 {
   struct table *t = table_create (1, 1, 0, 0, 0, 0);
-  t->styles[0] = xmalloc (sizeof *t->styles[0]);
+  t->styles[0] = pool_alloc (t->container, sizeof *t->styles[0]);
   *t->styles[0] = (struct area_style) {
     AREA_STYLE_INITIALIZER__,
     .cell_style.halign = TABLE_HALIGN_LEFT,