1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

clitar: propagate make_remote_path() talloc errors

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
David Disseldorp 2014-02-20 19:47:49 +01:00 committed by Andrew Bartlett
parent 55de6d60ef
commit 83a653fadb

@ -1593,7 +1593,6 @@ static int set_remote_attr(const char *filename, uint16 new_attr, int mode)
static int make_remote_path(const char *full_path)
{
extern struct cli_state *cli;
TALLOC_CTX *ctx = PANIC_IF_NULL(talloc_new(NULL));
char *path;
char *subpath;
char *state;
@ -1602,9 +1601,21 @@ static int make_remote_path(const char *full_path)
int len;
NTSTATUS status;
int err = 0;
TALLOC_CTX *ctx = talloc_new(NULL);
if (ctx == NULL) {
return 1;
}
subpath = PANIC_IF_NULL(talloc_strdup(ctx, full_path));
path = PANIC_IF_NULL(talloc_strdup(ctx, full_path));
subpath = talloc_strdup(ctx, full_path);
if (subpath == NULL) {
err = 1;
goto out;
}
path = talloc_strdup(ctx, full_path);
if (path == NULL) {
err = 1;
goto out;
}
len = talloc_get_size(path) - 1;
last_backslash = strrchr_m(path, '\\');