Skip to content

Commit ce3beeb

Browse files
committed
gh-90071: Stop freeing data which was never alloated
1 parent f10f503 commit ce3beeb

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Modules/readline.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,7 @@ readline_set_completer_delims(PyObject *module, PyObject *string)
588588
static void
589589
_py_free_history_entry(HIST_ENTRY *entry)
590590
{
591-
histdata_t data = free_history_entry(entry);
592-
free(data);
591+
(void)free_history_entry(entry);
593592
}
594593

595594
#else
@@ -601,8 +600,6 @@ _py_free_history_entry(HIST_ENTRY *entry)
601600
{
602601
if (entry->line)
603602
free((void *)entry->line);
604-
if (entry->data)
605-
free(entry->data);
606603
free(entry);
607604
}
608605

0 commit comments

Comments
 (0)