BOOL autoAllocate = FALSE;
LONG status;
DWORD cbAttrLen = 0;
- LPBYTE pbAttr = NULL;
+ LPBYTE* ppbAttr = NULL;
GetAttrib_Return ret = { 0 };
IRP* irp = operation->irp;
const GetAttrib_Call* call = operation->call;
if (!call->fpbAttrIsNULL)
{
autoAllocate = (call->cbAttrLen == SCARD_AUTOALLOCATE) ? TRUE : FALSE;
- pbAttr = autoAllocate ? (LPBYTE) & (ret.pbAttr) : ret.pbAttr;
+ *ppbAttr = autoAllocate ? (LPBYTE) & (ret.pbAttr) : ret.pbAttr;
cbAttrLen = call->cbAttrLen;
}
return SCARD_E_NO_MEMORY;
}
- ret.ReturnCode = SCardGetAttrib(operation->hCard, call->dwAttrId, pbAttr, &cbAttrLen);
+ ret.ReturnCode = SCardGetAttrib(operation->hCard, call->dwAttrId, *ppbAttr, &cbAttrLen);
+
log_status_error(TAG, "SCardGetAttrib", ret.ReturnCode);
ret.cbAttrLen = cbAttrLen;