Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge SVN 5163
Browse files Browse the repository at this point in the history
ddeclerck committed Jan 27, 2025
1 parent c85e397 commit 415bc43
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions libcob/ChangeLog
Original file line number Diff line number Diff line change
@@ -72,6 +72,7 @@

* screenio.c, common.c: replace use of NCURSES_MOUSE_VERSION by
HAVE_MOUSEMASK
* fileio.c (cob_file_sort_giving_internal): fix memory cleanup

2023-07-27 Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>

14 changes: 7 additions & 7 deletions libcob/fileio.c
Original file line number Diff line number Diff line change
@@ -9657,13 +9657,6 @@ cob_file_sort_giving_internal (cob_file *sort_file, const size_t giving_cnt,
}
}

/* cleanup temporary arrays */
cob_free (opt);
cob_free (fbase);
if (callfh) {
cob_free (callfh);
}

/* if any error happened with the GIVING files update SORT-RETURN */
if (hp->sort_return) {
for (i = 0; i < giving_cnt; ++i) {
@@ -9673,6 +9666,13 @@ cob_file_sort_giving_internal (cob_file *sort_file, const size_t giving_cnt,
}
}
}

/* cleanup temporary arrays */
cob_free (opt);
cob_free (fbase);
if (callfh) {
cob_free (callfh);
}
}

/* SORT: WRITE all records from 'sort_file' to all passed USING files */

0 comments on commit 415bc43

Please sign in to comment.