summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
committerSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
commit7019bfe546912397e7f4d37a44a510ce17a7febb (patch)
tree38c00e34ce75329ad7f345174328f19b5bc5887f /source3/client
parent72544acc0d8fe7d3b43c3472638fe0ff847e993f (diff)
downloadsamba-7019bfe546912397e7f4d37a44a510ce17a7febb.tar.gz
samba-7019bfe546912397e7f4d37a44a510ce17a7febb.tar.bz2
samba-7019bfe546912397e7f4d37a44a510ce17a7febb.zip
fixes (asprintf) from 2.2
(This used to be commit 6b123adda901ff05b0271eeda060297448f64eec)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index f1059f8ee1..eb9750299b 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1343,7 +1343,7 @@ static int cmd_mput(void)
/* if (!recurse) continue; */
SAFE_FREE(quest);
- asprintf(&quest, "Put directory %s? ", lname);
+ if (asprintf(&quest, "Put directory %s? ", lname) < 0) break;
if (prompt && !yesno(quest)) { /* No */
/* Skip the directory */
lname[strlen(lname)-1] = '/';
@@ -1351,7 +1351,7 @@ static int cmd_mput(void)
break;
} else { /* Yes */
SAFE_FREE(rname);
- asprintf(&rname, "%s%s", cur_dir, lname);
+ if(asprintf(&rname, "%s%s", cur_dir, lname) < 0) break;
dos_format(rname);
if (!cli_chkpath(cli, rname) &&
!do_mkdir(rname)) {
@@ -1365,13 +1365,13 @@ static int cmd_mput(void)
continue;
} else {
SAFE_FREE(quest);
- asprintf(&quest,"Put file %s? ", lname);
+ if (asprintf(&quest,"Put file %s? ", lname) < 0) break;
if (prompt && !yesno(quest)) /* No */
continue;
/* Yes */
SAFE_FREE(rname);
- asprintf(&rname, "%s%s", cur_dir, lname);
+ if (asprintf(&rname, "%s%s", cur_dir, lname) < 0) break;
}
dos_format(rname);