From a6864ad907239985bd1f6eab414cec6171930d46 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 23 Jan 2012 02:37:40 +0000 Subject: [PATCH] key-data.c (key_struct{set,steal}): Assert no other references. Otherwise I predict serious trouble when someone gets the reference counting wrong. --- key-data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/key-data.c b/key-data.c index 43ad901..0e79b32 100644 --- a/key-data.c +++ b/key-data.c @@ -350,6 +350,7 @@ static void structset(key_data *k, int stealp, unsigned f; assert(((void)"Key is not structured", k->e == KENC_STRUCT)); + assert(((void)"Key has multiple references", k->ref == 1)); if (!kd) { ks = sym_find(&k->u.s, tag, -1, 0, 0); if (ks) sym_remove(&k->u.s, ks); -- 2.11.0