Skip to content

Commit 2a1062f

Browse files
committed
Don't bother cleaning the hash before an error
1 parent 1384944 commit 2a1062f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rbindlist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ SEXP rbindlist(SEXP l, SEXP usenamesArg, SEXP fillArg, SEXP idcolArg, SEXP ignor
439439
if (tt==NULL) {
440440
// # nocov start
441441
// C spec states that if realloc() fails (above) the original block (levelsRaw) is left untouched: it is not freed or moved. We ...
442-
for (int k=0; k<nLevel; k++) hash_set(marks, levelsRaw[k], 0); // ... rely on that in this loop which uses levelsRaw.
442+
// ... rely on that by freeing levelsRaw.
443443
free(levelsRaw);
444444
error(_("Failed to allocate working memory for %d factor levels of result column %d when reading item %d of item %d"), allocLevel, idcol+j+1, w+1, i+1);
445445
// # nocov end

0 commit comments

Comments
 (0)