746b299 from master must be merged to 3.5. From the checkin message: Fix the talloc hierarchy in shadow_copy2_connectpath We have to return on talloc_tos() because we don't have a mem_ctx given to us. So we have to create a separate temporary talloc context.
I had to think a bit about the patch (since the talloc_new(talloc_tos()) puzzled me, but yes, this patch is needed for 3.5. :-)
Pushed to v3-5-test. Closing out bug report. Thanks!