projects
/
platform
/
upstream
/
pango.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f420100
)
[HB] Fix leak when duplicating blob
author
Behdad Esfahbod
<behdad@behdad.org>
Sat, 27 Mar 2010 21:00:19 +0000
(17:00 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Sat, 27 Mar 2010 21:00:19 +0000
(17:00 -0400)
pango/opentype/hb-blob.c
patch
|
blob
|
history
diff --git
a/pango/opentype/hb-blob.c
b/pango/opentype/hb-blob.c
index
3348a38
..
3e787fc
100644
(file)
--- a/
pango/opentype/hb-blob.c
+++ b/
pango/opentype/hb-blob.c
@@
-359,9
+359,11
@@
hb_blob_try_writable (hb_blob_t *blob)
fprintf (stderr, "%p %s: dupped successfully -> %p\n", blob, __FUNCTION__, blob->data);
#endif
memcpy (new_data, blob->data, blob->length);
- blob->data = new_data;
- blob->mode = HB_MEMORY_MODE_WRITABLE;
_hb_blob_destroy_user_data (blob);
+ blob->mode = HB_MEMORY_MODE_WRITABLE;
+ blob->data = new_data;
+ blob->destroy = free;
+ blob->user_data = new_data;
}
}
else if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE)