]> git.kaiwu.me - njs.git/commitdiff
Fixed typo introduced in c7d2a7846b0b.
authorVadim Zhestikov <v.zhestikov@f5.com>
Thu, 31 Aug 2023 15:24:17 +0000 (08:24 -0700)
committerVadim Zhestikov <v.zhestikov@f5.com>
Thu, 31 Aug 2023 15:24:17 +0000 (08:24 -0700)
Found by Coverity (CID 1542439).

src/njs_object.c

index 683cabde874f612f0d5cfc60dc288f1c99956377..51f28739e7a777991605442af3c99b9764d895cf 100644 (file)
@@ -1175,7 +1175,7 @@ njs_object_own_enumerate_object(njs_vm_t *vm, const njs_object_t *object,
     case NJS_ENUM_VALUES:
     case NJS_ENUM_BOTH:
         items_sorted = njs_array_alloc(vm, 1, 0, NJS_ARRAY_SPARE);
-        if (njs_slow_path(items == NULL)) {
+        if (njs_slow_path(items_sorted == NULL)) {
             return NJS_ERROR;
         }