projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fbc1e6
)
Use release_fn() instead of free() in mono_file_map since allocation is using alloc_fn()
author
Csaba Halasz
<Csaba.Halasz@gmail.com>
Thu, 15 Dec 2011 19:11:45 +0000
(20:11 +0100)
committer
Csaba Halasz
<Csaba.Halasz@gmail.com>
Thu, 15 Dec 2011 19:11:45 +0000
(20:11 +0100)
mono/utils/mono-filemap.c
patch
|
blob
|
history
diff --git
a/mono/utils/mono-filemap.c
b/mono/utils/mono-filemap.c
index b557ff323315e5600c96ae953d1549d27ac29ce8..fb25eafe2666426ceaf54e9dc3185d0a99c3c6d5 100644
(file)
--- a/
mono/utils/mono-filemap.c
+++ b/
mono/utils/mono-filemap.c
@@
-82,7
+82,7
@@
mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_hand
return NULL;
cur_offset = lseek (fd, 0, SEEK_CUR);
if (lseek (fd, offset, SEEK_SET) != offset) {
-
free
(ptr);
+
(*release_fn)
(ptr);
return NULL;
}
bytes_read = read (fd, ptr, length);