Skip to content

Commit

Permalink
Use correct dealloc, #251
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Jul 11, 2023
1 parent 1e4de38 commit 14c340a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"msgpackr": "^1.9.5",
"node-addon-api": "^6.1.0",
"node-gyp-build-optional-packages": "5.1.0",
"ordered-binary": "^1.4.0",
"ordered-binary": "^1.4.1",
"weak-lru-cache": "^1.2.2",
"yarn": "^1.22.19"
},
Expand Down
4 changes: 2 additions & 2 deletions src/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ next_inst: start = instruction++;
else
rc = mdb_put(txn, dbi, &key, &value, flags & (MDB_NOOVERWRITE | MDB_NODUPDATA | MDB_APPEND | MDB_APPENDDUP));
if (flags & COMPRESSIBLE)
free(value.mv_data);
delete value.mv_data;
//fprintf(stdout, "put %u \n", key.mv_size);
break;
case DEL:
Expand All @@ -295,7 +295,7 @@ next_inst: start = instruction++;
case DEL_VALUE:
rc = mdb_del(txn, dbi, &key, &value);
if (flags & COMPRESSIBLE)
free(value.mv_data);
delete value.mv_data;
break;
case START_BLOCK: case START_CONDITION_BLOCK:
rc = validated ? 0 : MDB_NOTFOUND;
Expand Down

0 comments on commit 14c340a

Please sign in to comment.