summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2023-10-28 23:58:03 +0200
committerNico Williams <nico@cryptonector.com>2023-10-30 22:12:27 -0500
commitd5590f90dad1764a7e0aa35f83c6ef4611939194 (patch)
treee3967b85ab273d150cb226273161de3a3765585a /src
parente85e3582330af543f1a7b293c6b9b27f342670a2 (diff)
jvp_object_contains: remove unnecessary jv_copy
Diffstat (limited to 'src')
-rw-r--r--src/jv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/jv.c b/src/jv.c
index eec4ec5a..ada15fed 100644
--- a/src/jv.c
+++ b/src/jv.c
@@ -1729,10 +1729,9 @@ static int jvp_object_contains(jv a, jv b) {
int r = 1;
jv_object_foreach(b, key, b_val) {
- jv a_val = jv_object_get(jv_copy(a), jv_copy(key));
+ jv a_val = jv_object_get(jv_copy(a), key);
r = jv_contains(a_val, b_val);
- jv_free(key);
if (!r) break;
}