mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tests/resource: Initialise gnttab before xenforeignmemory_map_resource()
It's the 'addr' input to mmap(), and currently consuming stack rubble.
Coverity-ID: 1500115
Fixes: c7a7f14b92 ("tests/resource: Extend to check that the grant frames are mapped correctly")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
1 parent
686f13cfce
commit
39bcecb9a8
1 file changed
+1
-1
@@ -24,7 +24,7 @@ static void test_gnttab(uint32_t domid, unsigned int nr_frames,
|
||||
unsigned long gfn)
|
||||
{
|
||||
xenforeignmemory_resource_handle *res;
|
||||
grant_entry_v1_t *gnttab;
|
||||
grant_entry_v1_t *gnttab = NULL;
|
||||
size_t size;
|
||||
int rc;
|
||||
uint32_t refs[nr_frames], domids[nr_frames];
|
||||
|
||||