shadow_copy2: Fix error handling in shadow_copy2_get_shadow_copy_data
commit17a6a78e4cc1e1fc2b20006ca7104a72a7e3341c
authorRajesh Joseph <rjoseph@redhat.com>
Thu, 21 Jul 2016 09:58:43 +0000 (21 09:58 +0000)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 08:06:13 +0000 (28 10:06 +0200)
treeef10b8c4e3abcfb85e6df87a5e74d33c10dd0edf
parent57518cf0d2960fa5ebe7b882a7cd5e6326ee72f7
shadow_copy2: Fix error handling in shadow_copy2_get_shadow_copy_data

Memory was freed in most of the failure cases. It is always better
to free the memory at the end of the function so that all exit path
of the function will free the memory. Otherwise chances are that
you might miss some cleanup.

Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/modules/vfs_shadow_copy2.c