[vlc-commits] Fix memory leak (cid #1049518)
Rémi Duraffort
git at videolan.org
Mon Jul 22 17:51:27 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 22 17:01:40 2013 +0200| [a818763e8641524222ba3f78e47f5e5349a14903] | committer: Jean-Baptiste Kempf
Fix memory leak (cid #1049518)
(cherry picked from commit 231117945693d34d1a7075ff1d5e9b86ffd16d92)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=a818763e8641524222ba3f78e47f5e5349a14903
---
lib/vlm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/vlm.c b/lib/vlm.c
index ed3d7e4..aad066b 100644
--- a/lib/vlm.c
+++ b/lib/vlm.c
@@ -263,11 +263,16 @@ static char* recurse_answer( vlm_message_t *p_answer, const char* psz_delim,
* inside a list), create a property of its name as if it
* had a name value node
*/
+ free( psz_nametag );
if( i_list )
{
i_success = asprintf( &psz_nametag, "\"name\": \"%s\",%s",
aw_child->psz_name, psz_childdelim );
- if( i_success == -1 ) break;
+ if( i_success == -1 )
+ {
+ psz_nametag = NULL;
+ break;
+ }
}
else
{
More information about the vlc-commits
mailing list