summaryrefslogtreecommitdiff
path: root/source4/client
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-20 08:58:02 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:13 +0100
commit34ad9756d73bc4203281ab39ff68489aab1b44e9 (patch)
treecf2c7f1849fe57a3b391b9fa6706cb72543531d2 /source4/client
parente762858a054f865780e9f05f7896452a525890f4 (diff)
downloadsamba-34ad9756d73bc4203281ab39ff68489aab1b44e9.tar.gz
samba-34ad9756d73bc4203281ab39ff68489aab1b44e9.tar.bz2
samba-34ad9756d73bc4203281ab39ff68489aab1b44e9.zip
s4-client: Don't leak resource handle.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source4/client')
-rw-r--r--source4/client/client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 9985338477..1dc5b6dd01 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -1130,6 +1130,7 @@ static int do_put(struct smbclient_context *ctx, char *rname, char *lname, bool
if (f && reput) {
if (x_tseek(f, start, SEEK_SET) == -1) {
d_printf("Error seeking local file\n");
+ x_fclose(f);
return 1;
}
}
@@ -1147,6 +1148,7 @@ static int do_put(struct smbclient_context *ctx, char *rname, char *lname, bool
buf = (uint8_t *)malloc(maxwrite);
if (!buf) {
d_printf("ERROR: Not enough memory!\n");
+ x_fclose(f);
return 1;
}
while (!x_feof(f)) {