musicbrainz: fix leak
authorJohannes Kauffmann <johanneskauffmann@hotmail.com>
Tue, 19 Nov 2024 22:30:23 +0000 (23:30 +0100)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
(cherry picked from commit 2edddb01da361d1040736d7fda637e118ea6aee1) (edited)
edited:
- the 3.0 uses the other json parser which outputs the result differently

Gbp-Pq: Name 0105-musicbrainz-fix-leak.patch

modules/misc/webservices/musicbrainz.c

index 2393a7320afcfaa7bc8735862635bcd14c9f11ca..2c35f75c08c4198303d9b7d3fc57a8f8684686ad 100644 (file)
@@ -56,7 +56,11 @@ static musicbrainz_lookup_t * musicbrainz_lookup(vlc_object_t *p_obj, const char
     {
         p_lookup->root = json_parse_document(p_obj, p_buffer);
         if (!p_lookup->root)
+        {
             msg_Dbg(p_obj, "No results");
+            musicbrainz_lookup_release(p_lookup);
+            p_lookup = NULL;
+        }
     }
     free(p_buffer);
     return p_lookup;