From: Ralph Boehme Date: Wed, 30 Jul 2025 07:53:40 +0000 (+0200) Subject: smbclient: fix handling errors from do_put in mput X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=68515aa5a73bed540ea543458e1feca8dc40fffd;p=thirdparty%2Fsamba.git smbclient: fix handling errors from do_put in mput Pair-Programmed-With: Anoop C S Signed-off-by: Ralph Boehme Signed-off-by: Anoop C S Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Fri Aug 8 11:59:33 UTC 2025 on atb-devel-224 --- diff --git a/source3/client/client.c b/source3/client/client.c index e96efb9ea23..c8b157bb0c3 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2177,6 +2177,7 @@ static int cmd_mput(void) ret = file_find(ctx, &file_list, ".", p, true); if (ret) { free_file_list(file_list); + file_list = NULL; continue; } @@ -2267,12 +2268,19 @@ static int cmd_mput(void) break; } } - do_put(rname, lname, false); + ret = do_put(rname, lname, false); + if (ret != 0) { + break; + } } free_file_list(file_list); + file_list = NULL; SAFE_FREE(quest); SAFE_FREE(lname); SAFE_FREE(rname); + if (ret != 0) { + return ret; + } } return 0;