diff options
author | Gianni Tedesco <gianni.tedesco@citrix.com> | 2010-08-16 13:39:19 +0100 |
---|---|---|
committer | Gianni Tedesco <gianni.tedesco@citrix.com> | 2010-08-16 13:39:19 +0100 |
commit | 8eb8ac72924e430b89497995be61ccb2a2402919 (patch) | |
tree | 1dd14776267c094ba8f73c0bd4d2439a68b0ece2 /tools/libxl/libxl_internal.c | |
parent | 2385a2339abfca211af3267a63e12167310b4377 (diff) | |
download | xen-8eb8ac72924e430b89497995be61ccb2a2402919.tar.gz xen-8eb8ac72924e430b89497995be61ccb2a2402919.tar.bz2 xen-8eb8ac72924e430b89497995be61ccb2a2402919.zip |
tools/libxl: remove libxl_free() since there are no more callers
libxl_free() allows allocated memory to be explicitly free'd from a
libxl_gc. Every previous use of this function has now been made
redundant and therefore has been removed. We can safely kill it and
amend the policy accordingly.
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.c')
-rw-r--r-- | tools/libxl/libxl_internal.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 2d5ad9a033..5eb27a6f4d 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -59,25 +59,6 @@ int libxl_ptr_add(libxl_gc *gc, void *ptr) return 0; } -void libxl_free(libxl_gc *gc, void *ptr) -{ - int i; - - if (!ptr) - return; - - /* remove the pointer from the tracked ptrs */ - for (i = 0; i < gc->alloc_maxsize; i++) { - if (gc->alloc_ptrs[i] == ptr) { - gc->alloc_ptrs[i] = NULL; - free(ptr); - return; - } - } - /* haven't find the pointer, really bad */ - abort(); -} - void libxl_free_all(libxl_gc *gc) { void *ptr; |