fix potential memory leak

pull/4218/head
ChunkyProgrammer 2023-12-19 23:07:18 -05:00
rodzic 6488794218
commit 090b470bfc
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -37,6 +37,7 @@ module Invidious::Routes::API::V1::Search
url = "/complete/search?client=youtube&hl=en&gl=#{region}&q=#{URI.encode_www_form(query)}&gs_ri=youtube&ds=yt"
response = client.get(url).body
client.close
body = JSON.parse(response[19..-2]).as_a
suggestions = body[1].as_a[0..-2]