We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e76b8da commit 7f7ee75Copy full SHA for 7f7ee75
src/core/util.c
@@ -429,10 +429,11 @@ void janet_registry_put(
429
if (newcap < 512) {
430
newcap = 512;
431
}
432
- janet_vm.registry = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
433
- if (NULL == janet_vm.registry) {
+ void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
+ if (NULL == newmem) {
434
JANET_OUT_OF_MEMORY;
435
436
+ janet_vm.registry = newmem;
437
janet_vm.registry_cap = newcap;
438
439
JanetCFunRegistry value = {
0 commit comments