]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Backport array removal fix.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 18 Apr 2015 15:10:47 +0000 (16:10 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 18 Apr 2015 15:10:47 +0000 (16:10 +0100)
contrib/libucl/ucl_hash.c

index 275e84d478aa0e57ab8cf6a66b894e9eaadec73c..760952e8d8187e61777361f4f9fb1868b52dcc37 100644 (file)
@@ -336,7 +336,7 @@ ucl_hash_delete (ucl_hash_t* hashlin, const ucl_object_t *obj)
                k = kh_get (ucl_hash_caseless_node, h, obj);
                if (k != kh_end (h)) {
                        elt = &kh_value (h, k);
-                       kv_A (hashlin->ar, elt->ar_idx) = NULL;
+                       kv_del (const ucl_object_t *, hashlin->ar, elt->ar_idx);
                        kh_del (ucl_hash_caseless_node, h, k);
                }
        }
@@ -346,7 +346,7 @@ ucl_hash_delete (ucl_hash_t* hashlin, const ucl_object_t *obj)
                k = kh_get (ucl_hash_node, h, obj);
                if (k != kh_end (h)) {
                        elt = &kh_value (h, k);
-                       kv_A (hashlin->ar, elt->ar_idx) = NULL;
+                       kv_del (const ucl_object_t *, hashlin->ar, elt->ar_idx);
                        kh_del (ucl_hash_node, h, k);
                }
        }