]> git.sesse.net Git - mlt/commitdiff
fix memory leak (coverity-709391)
authorDan Dennedy <dan@dennedy.org>
Mon, 23 Jul 2012 00:32:51 +0000 (17:32 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 23 Jul 2012 00:32:51 +0000 (17:32 -0700)
src/modules/vorbis/producer_vorbis.c

index 908aeec4d608944f95c1aaa20e5c9120bc61788c..479e721771ab5102f86dd099c37b000bb1e2cc1c 100644 (file)
@@ -152,8 +152,14 @@ static int producer_open( mlt_producer this, mlt_profile profile, char *file )
                        char **ptr = ov_comment(ov, -1)->user_comments;
                        while(*ptr) {
                                metadata = vorbis_metadata_from_str (*ptr);
-                               if (metadata != NULL)
+                               if (metadata != NULL) {
                                        mlt_properties_set(properties, metadata->name, metadata->content);
+                                       if (metadata->name)
+                                               free(metadata->name);
+                                       if (metadata->content)
+                                               free(metadata->content);
+                                       free(metadata);
+                               }
                                ++ptr;
                        }