diff options
author | Maria Matejka <mq@ucw.cz> | 2020-05-01 15:34:17 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2020-05-01 15:34:17 +0200 |
commit | 048eb2ddf1ee9587d9fa30cbb3f87d6f650a2133 (patch) | |
tree | fdec4c5679a02c901cf2bc92fd81618c6f12d48e /lib/resource.c | |
parent | 17de3a023f7bde293892b41bfafe5740c8553fc8 (diff) | |
parent | 59238768b3b05fa134348d2232b42537d0403994 (diff) |
Merge remote-tracking branch 'origin/mq-static-analysis'
Diffstat (limited to 'lib/resource.c')
-rw-r--r-- | lib/resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/resource.c b/lib/resource.c index ab8c800f..5589373e 100644 --- a/lib/resource.c +++ b/lib/resource.c @@ -340,6 +340,7 @@ mb_alloc(pool *p, unsigned size) struct mblock *b = xmalloc(sizeof(struct mblock) + size); b->r.class = &mb_class; + b->r.n = (node) {}; add_tail(&p->inside, &b->r.n); b->size = size; return b->data; @@ -387,7 +388,7 @@ mb_realloc(void *m, unsigned size) struct mblock *b = SKIP_BACK(struct mblock, data, m); b = xrealloc(b, sizeof(struct mblock) + size); - replace_node(&b->r.n, &b->r.n); + update_node(&b->r.n); b->size = size; return b->data; } |