diff mbox

[5/7] libqos: Change free function called in malloc

Message ID 1406226665-1710-6-git-send-email-marc.mari.barcelo@gmail.com
State New
Headers show

Commit Message

Marc Marí July 24, 2014, 6:31 p.m. UTC
Signed-off-by: Marc Marí <marc.mari.barcelo@gmail.com>
---
 tests/libqos/malloc.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Hajnoczi July 25, 2014, 3:23 p.m. UTC | #1
On Thu, Jul 24, 2014 at 08:31:03PM +0200, Marc Marí wrote:
> Signed-off-by: Marc Marí <marc.mari.barcelo@gmail.com>
> ---
>  tests/libqos/malloc.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h
> index 46f6000..5565381 100644
> --- a/tests/libqos/malloc.h
> +++ b/tests/libqos/malloc.h
> @@ -32,7 +32,7 @@ static inline uint64_t guest_alloc(QGuestAllocator *allocator, size_t size)
>  
>  static inline void guest_free(QGuestAllocator *allocator, uint64_t addr)
>  {
> -    allocator->alloc(allocator, addr);
> +    allocator->free(allocator, addr);
>  }

Hahahahahahaha!

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
John Snow July 29, 2014, 8:47 p.m. UTC | #2
On 07/24/2014 02:31 PM, Marc Marí wrote:
> Signed-off-by: Marc Marí <marc.mari.barcelo@gmail.com>
> ---
>   tests/libqos/malloc.h |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h
> index 46f6000..5565381 100644
> --- a/tests/libqos/malloc.h
> +++ b/tests/libqos/malloc.h
> @@ -32,7 +32,7 @@ static inline uint64_t guest_alloc(QGuestAllocator *allocator, size_t size)
>   
>   static inline void guest_free(QGuestAllocator *allocator, uint64_t addr)
>   {
> -    allocator->alloc(allocator, addr);
> +    allocator->free(allocator, addr);
>   }
>   
>   #endif
Imagine my surprise when I noticed the allocator was summoning up 
millions of bytes. "Oh good!"

Reviewed-by: John Snow <jsnow@redhat.com>
diff mbox

Patch

diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h
index 46f6000..5565381 100644
--- a/tests/libqos/malloc.h
+++ b/tests/libqos/malloc.h
@@ -32,7 +32,7 @@  static inline uint64_t guest_alloc(QGuestAllocator *allocator, size_t size)
 
 static inline void guest_free(QGuestAllocator *allocator, uint64_t addr)
 {
-    allocator->alloc(allocator, addr);
+    allocator->free(allocator, addr);
 }
 
 #endif