]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: shctx: Set last_append to NULL when reserving block in hot list
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 16 Nov 2023 16:38:11 +0000 (17:38 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 16 Nov 2023 18:35:10 +0000 (19:35 +0100)
Ensure that the last_append pointer is always set to NULL on first block
of rows reserved by the subsystems using the shctx (cache for instance).
This pointer will be used directly in shctx_row_data_append instead of
the 'from' param which will simplify its uses.

src/shctx.c

index d114d469fda944796f0a65a0ced76251f6461d86..862adb68badc492f59b9ed8c05a9a99aad228793 100644 (file)
@@ -114,6 +114,7 @@ struct shared_block *shctx_row_reserve_hot(struct shared_context *shctx,
                                        ret->block_count = freed;
                                        ret->refcount = 1;
                                        ret->last_reserved = block;
+                                       ret->last_append = NULL;
                                        enough = 1;
                                        break;
                                }