mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ntvfs: Fix CID 1107225 Resource leak
After the talloc_strdup, we don't need cwd anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
ee78af33fe
commit
e8a77df79e
@ -196,9 +196,11 @@ static struct pvfs_sys_ctx *pvfs_sys_pushdir(struct pvfs_state *pvfs,
|
||||
talloc_free(ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ctx->old_wd = talloc_strdup(ctx, cwd);
|
||||
free(cwd);
|
||||
|
||||
if (ctx->old_wd == NULL) {
|
||||
free(cwd);
|
||||
talloc_free(ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user