Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 223f4947318c3f8be6d8cadd9139250a7902bebb 1 parent 70adf46
@andygrundman authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  bindings/perl/xs/Result.xs
View
2  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;
Please sign in to comment.
Something went wrong with that request. Please try again.