Skip to content

smbclient_state_free leads to segfault #5

Open
@legsak1mbo

Description

@legsak1mbo

I'd been working on context support but noticed that it's been added anyway which is great. However freeing the context seems to occasionally cause a segfault the next time that smbclient_opendir is called.

Example script:-

$state = smbclient_state_new();
smbclient_state_init($state, 'WORKGROUP', 'username', 'password');
$dir = smbclient_opendir($state, $url);
smbclient_closedir($state, $dir);
smbclient_state_free($state);

The first three or four requests are fine, after that it begins seemingly randomly segfaulting. Removing any mention of smbc_free_context from libsmbclient.c prevents the issue from happening but obviously isn't ideal because connections are then left open.

I'm testing this with PHP 5.5 on Apache Prefork.

Let me know if you need any more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions