diff options
author | John Ankarström <john@ankarstrom.se> | 2022-02-15 19:42:23 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-02-15 19:42:23 +0100 |
commit | 3b05844d760424859912d3d673dd8fc2be73d96f (patch) | |
tree | ec7c764889a741424c3531e82afd4bd894503e02 /c/episodelistview.c | |
parent | c1eee2b46cd5643ba8efb98b2cd598ef47c4daf6 (diff) | |
download | EpisodeBrowser-3b05844d760424859912d3d673dd8fc2be73d96f.tar.gz |
Fix memory bug in DlvShowEpisode.
I forgot to call PL_new_term_ref for tValue.
Diffstat (limited to 'c/episodelistview.c')
-rw-r--r-- | c/episodelistview.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c index 0b9e855..42a2151 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -81,6 +81,7 @@ ElvHandleNotify(LPARAM lParam) void ElvUpdate() { + fid_t f; HWND hListView; LVITEM lviEpisode, lviName; qid_t q; @@ -92,6 +93,7 @@ ElvUpdate() lviEpisode.mask = LVIF_TEXT|LVIF_PARAM; lviName.mask = LVIF_TEXT; + f = PL_open_foreign_frame(); t = PL_new_term_refs(2); PL_call_predicate(NULL, PL_Q_NORMAL, PL_predicate("update_tracked_episodes", 0, "track_episodes"), @@ -162,7 +164,8 @@ ElvUpdate() } close: - PL_close_query(q); + PL_cut_query(q); + PL_close_foreign_frame(f); } /* Update episode name. */ |