From ed20a67a1268bf517cfdbc1a897b659dce38f3a4 Mon Sep 17 00:00:00 2001 From: Ziv Scully Date: Thu, 12 Nov 2015 10:06:07 -0500 Subject: Initialize invalidation to NULL! --- src/c/urweb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/c/urweb.c b/src/c/urweb.c index 050a06c9..55d89fd5 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -585,6 +585,7 @@ uw_context uw_init(int id, uw_loggers *lg) { ctx->numRecording = 0; ctx->recordingOffset = 0; + ctx->inval = NULL; ctx->remoteSock = -1; @@ -4732,9 +4733,11 @@ void uw_Sqlcache_flush(uw_context ctx, uw_Sqlcache_Cache *cache, char **keys) { inval->keys = keys; inval->next = NULL; if (ctx->inval) { + // An invalidation is already registered, so just extend it. ctx->inval->next = inval; } else { uw_register_transactional(ctx, inval, uw_Sqlcache_flushCommit, NULL, uw_Sqlcache_flushFree); } + // [ctx->inval] should always point to the last invalidation. ctx->inval = inval; } -- cgit v1.2.3