]> granicus.if.org Git - php/commit
Retain reference to share handle from curl handle
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 11 Nov 2020 10:51:20 +0000 (11:51 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 11 Nov 2020 10:56:03 +0000 (11:56 +0100)
commitb4a2a9662b4244837e348f58d398523361dbcc7f
tree8a8f6b15216c330efb2286a7d941182225cce745
parent11c4821ba968d2a39310851ab89d673c553b72f3
Retain reference to share handle from curl handle

Not keeping a reference will not result in use after free, because
curl protects against it, but it will result in a memory leak,
because curl_share_cleanup() will fail. We should make sure that
the share handle object stays alive as long as the curl handles
use it.
ext/curl/curl_private.h
ext/curl/interface.c
ext/curl/tests/curl_share_basic.phpt [new file with mode: 0644]