[babl] babl_realloc: move destructor from original to new
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl_realloc: move destructor from original to new
- Date: Sun, 27 Jun 2010 16:49:16 +0000 (UTC)
commit 288a8f101946933bce9436bc5f58cce78ad24178
Author: �yvind Kolås <pippin gimp org>
Date: Sun Jun 27 17:48:24 2010 +0100
babl_realloc: move destructor from original to new
babl/babl-memory.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl-memory.c b/babl/babl-memory.c
index 9c0b3d3..6ceca90 100644
--- a/babl/babl-memory.c
+++ b/babl/babl-memory.c
@@ -232,6 +232,8 @@ babl_realloc (void *ptr,
ret = babl_malloc (size);
#endif
memcpy (ret, ptr, babl_sizeof (ptr));
+ BAI (ret)->destructor = BAI (ptr)->destructor;
+ BAI (ptr)->destructor = NULL;
babl_free (ptr);
#if BABL_DEBUG_MEM
babl_mutex_lock (babl_debug_mutex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]