diff options
author | Andreas Schneider <asn@samba.org> | 2013-02-20 08:58:02 +0100 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2013-02-22 16:36:13 +0100 |
commit | 34ad9756d73bc4203281ab39ff68489aab1b44e9 (patch) | |
tree | cf2c7f1849fe57a3b391b9fa6706cb72543531d2 /source4 | |
parent | e762858a054f865780e9f05f7896452a525890f4 (diff) | |
download | samba-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')
-rw-r--r-- | source4/client/client.c | 2 |
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)) { |