result =determine_path_error(
&orig_path[2], allow_wcard_last_component);
}
- goto fail;
+ return result;
}
/*
if ((dirpath == NULL) && (!(dirpath = SMB_STRDUP("")))) {
DEBUG(0, ("strdup failed\n"));
- result = NT_STATUS_NO_MEMORY;
- goto fail;
+ SAFE_FREE(name);
+ return NT_STATUS_NO_MEMORY;
}
/*
DEBUG(5,("conversion finished %s -> %s\n",orig_path, name));
done:
- result = NT_STATUS_OK;
pstrcpy(orig_path, name);
+ SAFE_FREE(name);
+ SAFE_FREE(dirpath);
+ return NT_STATUS_OK;
fail:
+ DEBUG(10, ("dirpath = [%s] start = [%s]\n", dirpath, start));
+ pstrcpy(orig_path, dirpath);
+ pstrcat(orig_path, "/");
+ pstrcat(orig_path, start);
SAFE_FREE(name);
SAFE_FREE(dirpath);
return result;