1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

[quickjs] attributes FreeValue

This commit is contained in:
Witold Filipczyk 2023-01-21 18:59:02 +01:00
parent a3624167ab
commit 8e5d90d155
2 changed files with 4 additions and 2 deletions

View File

@ -117,6 +117,7 @@ js_attributes_set_items(JSContext *ctx, JSValue this_val, void *node)
if (name != "" && name != "item" && name != "namedItem") {
JS_DefinePropertyValueStr(ctx, this_val, name.c_str(), JS_DupValue(ctx, obj), 0);
}
JS_FreeValue(ctx, obj);
}
}

View File

@ -110,10 +110,11 @@ js_element_get_property_attributes(JSContext *ctx, JSValueConst this_val)
if (!attrs) {
return JS_NULL;
}
*attrs = el->get_attributes();
JSValue rr = getAttributes(ctx, attrs);
JS_FreeValue(ctx, rr);
return getAttributes(ctx, attrs);
RETURN_JS(rr);
}
static JSValue