If it's really ENOMEM, shadow_copy2_convert() did set this itself. It
might also return ENOENT for example. Found this while working on
other patches.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
handle,
stripped,
timestamp);
- TALLOC_FREE(stripped);
if (smb_fname->base_name == NULL) {
+ int err = errno;
+ TALLOC_FREE(stripped);
TALLOC_FREE(smb_fname);
- errno = ENOMEM;
+ errno = err;
return -1;
}
+ TALLOC_FREE(stripped);
/*
* Just pave over the user requested mode and use O_RDONLY. Later