From: Dmitry Volyntsev Date: Sat, 27 May 2023 03:58:19 +0000 (-0700) Subject: Removed dead store introduced in 398f4de34fe7. X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=30396d8b455f9342d1edeb7acca259e48cd459d8;p=njs.git Removed dead store introduced in 398f4de34fe7. Found by Coverity (CID 1530432). --- diff --git a/src/njs_array.c b/src/njs_array.c index aa9447c3..f87abd87 100644 --- a/src/njs_array.c +++ b/src/njs_array.c @@ -2860,14 +2860,9 @@ njs_sort_indexed_properties(njs_vm_t *vm, njs_value_t *obj, int64_t length, goto exception; } - if (slots != NULL) { - p = (void *) njs_cpymem(newslots, slots, - sizeof(njs_array_sort_slot_t) * (p - slots)); - njs_mp_free(vm->mem_pool, slots); - - } else { - p = newslots; - } + p = (void *) njs_cpymem(newslots, slots, + sizeof(njs_array_sort_slot_t) * (p - slots)); + njs_mp_free(vm->mem_pool, slots); slots = newslots; end = slots + nlen;