1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

ndrdump: avoid use after free

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Sun Nov 17 23:54:11 UTC 2019 on sn-devel-184
This commit is contained in:
Douglas Bagnall 2019-11-16 21:25:11 +13:00 committed by Douglas Bagnall
parent 816869ecea
commit e856877ef8

View File

@ -228,10 +228,11 @@ static NTSTATUS ndrdump_pull_and_print_pipes(const char *function,
return ndr_map_error2ntstatus(ndr_err);
}
pipes->pipes[i].ndr_print(ndr_print, n, c);
talloc_free(c);
if (*count == 0) {
talloc_free(c);
break;
}
talloc_free(c);
idx++;
}
}