win-pvdrivers

changeset 951:013b63248e5d

Fix FreeMemory size parameter
author James Harper <james.harper@bendigoit.com.au>
date Thu Nov 10 19:27:28 2011 +1100 (2011-11-10)
parents 916ea40186fc
children 58ad7893b3be
files xennet/xennet6_rx.c
line diff
     1.1 --- a/xennet/xennet6_rx.c	Thu Sep 22 23:47:46 2011 +1000
     1.2 +++ b/xennet/xennet6_rx.c	Thu Nov 10 19:27:28 2011 +1100
     1.3 @@ -50,8 +50,8 @@ get_pb_from_freelist(struct xennet_info 
     1.4    pb->mdl = IoAllocateMdl(pb->virtual, PAGE_SIZE, FALSE, FALSE, NULL);
     1.5    if (!pb->mdl)
     1.6    {
     1.7 -    NdisFreeMemory(pb->virtual, sizeof(shared_buffer_t), 0);
     1.8 -    NdisFreeMemory(pb, PAGE_SIZE, 0);
     1.9 +    NdisFreeMemory(pb->virtual, PAGE_SIZE, 0);
    1.10 +    NdisFreeMemory(pb, sizeof(shared_buffer_t), 0);
    1.11      return NULL;
    1.12    }
    1.13    pb->gref = (grant_ref_t)xi->vectors.GntTbl_GrantAccess(xi->vectors.context, 0,
    1.14 @@ -59,8 +59,8 @@ get_pb_from_freelist(struct xennet_info 
    1.15    if (pb->gref == INVALID_GRANT_REF)
    1.16    {
    1.17      IoFreeMdl(pb->mdl);
    1.18 -    NdisFreeMemory(pb->virtual, sizeof(shared_buffer_t), 0);
    1.19 -    NdisFreeMemory(pb, PAGE_SIZE, 0);
    1.20 +    NdisFreeMemory(pb->virtual, PAGE_SIZE, 0);
    1.21 +    NdisFreeMemory(pb, sizeof(shared_buffer_t), 0);
    1.22      return NULL;
    1.23    }
    1.24    MmBuildMdlForNonPagedPool(pb->mdl);
    1.25 @@ -85,8 +85,8 @@ put_pb_on_freelist(struct xennet_info *x
    1.26      if (xi->rx_pb_free > RX_MAX_PB_FREELIST)
    1.27      {
    1.28        IoFreeMdl(pb->mdl);
    1.29 -      NdisFreeMemory(pb->virtual, sizeof(shared_buffer_t), 0);
    1.30 -      NdisFreeMemory(pb, PAGE_SIZE, 0);
    1.31 +    NdisFreeMemory(pb->virtual, PAGE_SIZE, 0);
    1.32 +    NdisFreeMemory(pb, sizeof(shared_buffer_t), 0);
    1.33        return;
    1.34      }
    1.35      pb->mdl->ByteCount = PAGE_SIZE;