secur32: check for variable before freeing it
Austin English
austinenglish at gmail.com
Tue Oct 13 22:35:54 CDT 2009
On Tue, Oct 13, 2009 at 11:12 AM, Austin English
<austinenglish at gmail.com> wrote:
> On Tue, Oct 13, 2009 at 8:30 AM, Vitaliy Margolen
> <wine-devel at kievinfo.com> wrote:
>> Henri Verbeet wrote:
>>> 2009/10/13 Austin English <austinenglish at gmail.com>:
>>>> cred = schan_free_handle(i, SCHAN_HANDLE_CRED);
>>>> - pgnutls_certificate_free_credentials(cred->credentials);
>>>> + if(cred) pgnutls_certificate_free_credentials(cred->credentials);
>>> I don't think "cred" is ever supposed to be NULL. Could you add some
>>> traces to see where that handle comes from?
>
> I'll take a look tonight.
static void *schan_free_handle(ULONG_PTR handle_idx, enum
schan_handle_type type)
{
struct schan_handle *handle;
void *object;
if (handle_idx == SCHAN_INVALID_HANDLE) return NULL;
if (handle_idx >= schan_handle_count) return NULL;
Seems NULL comes from 'handle_idx >= schan_handle_count'.
--
-Austin
More information about the wine-devel
mailing list