Permalink
Browse files

Fix memory leak in result->thumbnails and result->tags

  • Loading branch information...
1 parent 70adf46 commit 223f4947318c3f8be6d8cadd9139250a7902bebb @andygrundman committed Sep 22, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 bindings/perl/xs/Result.xs
@@ -87,6 +87,7 @@ CODE:
{
int i;
RETVAL = newAV();
+ sv_2mortal((SV*)RETVAL);
for (i = 0; i < r->nthumbnails; i++) {
MediaScanImage *thumb = ms_result_get_thumbnail(r, i);
@@ -114,6 +115,7 @@ CODE:
int i;
int count = ms_result_get_tag_count(r);
RETVAL = newHV();
+ sv_2mortal((SV*)RETVAL);
for (i = 0; i < count; i++) {
const char *key, *value;

0 comments on commit 223f494

Please sign in to comment.