mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4-client: Don't leak resource handle.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
e762858a05
commit
34ad9756d7
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user