Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
newdir = talloc_strdup(ctx, new_dir);
if (!newdir) {
- TALLOC_FREE(ctx);
- return 1;
+ goto out;
}
normalize_name(newdir);
saved_dir = talloc_strdup(ctx, client_get_cur_dir());
if (!saved_dir) {
- TALLOC_FREE(ctx);
- return 1;
+ goto out;
}
if (*newdir == CLI_DIRSEP_CHAR) {
}
if (strequal(targetpath,CLI_DIRSEP_STR )) {
- TALLOC_FREE(ctx);
- return 0;
+ ret = 0;
+ goto out;
}