summaryrefslogtreecommitdiff
path: root/memcached.c
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2021-09-08 20:07:29 +0200
committerdormando <dormando@rydia.net>2021-11-23 15:47:47 -0800
commit75e4d574b34c6e3b5dd9330acd61097b75cdf1d3 (patch)
tree5cf2a0e4308f05ae03c69d8a68360e5555ddcf15 /memcached.c
parentb95ca35702a9ba3cdd8e0ad66137f95dea71cbe7 (diff)
downloadmemcached-75e4d574b34c6e3b5dd9330acd61097b75cdf1d3.tar.gz
Fix time-of-check time-of-use bugs
Fixing 'bugs' of the pattern: 'assert(ptr != 0)' after 'ptr' was already dereferenced
Diffstat (limited to 'memcached.c')
-rw-r--r--memcached.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memcached.c b/memcached.c
index 34d972d..a63797a 100644
--- a/memcached.c
+++ b/memcached.c
@@ -2319,8 +2319,8 @@ enum delta_result_type do_add_delta(conn *c, const char *key, const size_t nkey,
}
static int try_read_command_negotiate(conn *c) {
- assert(c->protocol == negotiating_prot);
assert(c != NULL);
+ assert(c->protocol == negotiating_prot);
assert(c->rcurr <= (c->rbuf + c->rsize));
assert(c->rbytes > 0);