"struct smb2_hnd" is talloced here, use talloc_get_type_abort()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
struct smb2_hnd **pph) /* Out */
{
struct idr_context *idp = cli->smb2.open_handles;
+ void *ph = NULL;
if (idp == NULL) {
return NT_STATUS_INVALID_PARAMETER;
}
- *pph = (struct smb2_hnd *)idr_find(idp, fnum);
- if (*pph == NULL) {
+ ph = idr_find(idp, fnum);
+ if (ph == NULL) {
return NT_STATUS_INVALID_HANDLE;
}
+ *pph = talloc_get_type_abort(ph, struct smb2_hnd);
return NT_STATUS_OK;
}