# HG changeset patch # User reimar # Date 1396810125 0 # Node ID ef0fa4caac9c4b9593e3432679486fb4432b9a5b # Parent 8aa4f25a4c17bd419d53b4863ed939306c110cc7 cddb: Fix memleak in error case. diff -r 8aa4f25a4c17 -r ef0fa4caac9c stream/stream_cddb.c --- a/stream/stream_cddb.c Sun Apr 06 18:46:45 2014 +0000 +++ b/stream/stream_cddb.c Sun Apr 06 18:48:45 2014 +0000 @@ -578,6 +578,7 @@ // do a sanity check if (http_hdr->body_size < (unsigned int)(ptr2 - ptr)) { mp_msg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_UnexpectedFIXME); + free(ptr); return -1; } cddb_data->xmcd_file = ptr;