git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0da6f55
)
perl: Decrement refcount in $g->delete_event_callback.
author
Richard W.M. Jones
<rjones@redhat.com>
Fri, 22 Apr 2011 20:34:08 +0000
(21:34 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 22 Apr 2011 20:50:15 +0000
(21:50 +0100)
This updates commit
bc468c87d04b34faacd208c49cca4a5096e5103c
.
generator/generator_perl.ml
patch
|
blob
|
history
diff --git
a/generator/generator_perl.ml
b/generator/generator_perl.ml
index
c832469
..
e2ec254
100644
(file)
--- a/
generator/generator_perl.ml
+++ b/
generator/generator_perl.ml
@@
-256,11
+256,15
@@
delete_event_callback (g, event_handle)
int event_handle;
PREINIT:
char key[64];
+ SV *cb;
CODE:
snprintf (key, sizeof key, \"_perl_event_%%d\", event_handle);
- guestfs_set_private (g, key, NULL);
-
- guestfs_delete_event_callback (g, event_handle);
+ cb = guestfs_get_private (g, key);
+ if (cb) {
+ SvREFCNT_dec (cb);
+ guestfs_set_private (g, key, NULL);
+ guestfs_delete_event_callback (g, event_handle);
+ }
SV *
last_errno (g)