]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_malloc/malloc_elem.c
update copyright date to 2013
[dpdk.git] / lib / librte_malloc / malloc_elem.c
index 0d2fdb6beae84e2dd986d54c0b6039aa07cfa947..919d47405d31532233d67ba5af50d30a89268e94 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -231,7 +231,10 @@ malloc_elem_free(struct malloc_elem *elem)
                elem->state = ELEM_FREE;
                elem->pad = 0;
        }
+       /* decrease heap's count of allocated elements */
+       elem->heap->alloc_count--;
        rte_spinlock_unlock(&(elem->heap->lock));
+
        return 0;
 }