Skip to content

Commit f945c82

Browse files
committed
Free history_get_history_state() result
It's not documented, but per https://bugs.python.org/issue8065 the result is freshly malloc'd and needs to be freed.
1 parent 1ce830a commit f945c82

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/readline/readline.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ PHP_FUNCTION(readline_list_history)
441441
}
442442
}
443443
}
444+
free(hs);
444445
}
445446

446447
#else /* readline */

0 commit comments

Comments
 (0)