summaryrefslogtreecommitdiff
path: root/source3/python/py_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/python/py_common.c')
-rw-r--r--source3/python/py_common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/python/py_common.c b/source3/python/py_common.c
index 364271d57c..d15df234d1 100644
--- a/source3/python/py_common.c
+++ b/source3/python/py_common.c
@@ -218,7 +218,7 @@ BOOL py_parse_creds(PyObject *creds, char **username, char **domain,
be freed by calling free(). */
struct cli_state *open_pipe_creds(char *server, PyObject *creds,
- int pipe_idx, char **errstr)
+ char *pipe_name, char **errstr)
{
char *username, *password, *domain;
struct cli_state *cli;
@@ -240,9 +240,10 @@ struct cli_state *open_pipe_creds(char *server, PyObject *creds,
return NULL;
}
- if (!cli_nt_session_open(cli, pipe_idx)) {
+ if (!cli_nt_session_open(cli, pipe_name)) {
cli_shutdown(cli);
- asprintf(errstr, "error opening pipe index %d", pipe_idx);
+ free(cli);
+ asprintf(errstr, "error opening %s", pipe_name);
return NULL;
}