]> granicus.if.org Git - php/commitdiff
Free history_get_history_state() result
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 11 Sep 2019 08:59:04 +0000 (10:59 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 11 Sep 2019 08:59:04 +0000 (10:59 +0200)
It's not documented, but per https://bugs.python.org/issue8065
the result is freshly malloc'd and needs to be freed.

ext/readline/readline.c

index b9435521ca8baeca9964b7f187bee28e51805b4c..174556d4d3f4532a2c54d952bcc057958b3bfb5a 100644 (file)
@@ -441,6 +441,7 @@ PHP_FUNCTION(readline_list_history)
                                }
                        }
                }
+               free(hs);
     }
 
 #else /* readline */