[vlc-devel] commit: Hum fix a memleak in test4 ... ( Rémi Duraffort )

git version control git at videolan.org
Thu Aug 14 00:25:25 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Aug 14 00:28:00 2008 +0200| [ffbd92724a257d0c92eb59032901803109100d26] | committer: Rémi Duraffort 

Hum fix a memleak in test4 ...

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ffbd92724a257d0c92eb59032901803109100d26
---

 modules/misc/testsuite/test4.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/misc/testsuite/test4.c b/modules/misc/testsuite/test4.c
index 7ce1015..170992e 100644
--- a/modules/misc/testsuite/test4.c
+++ b/modules/misc/testsuite/test4.c
@@ -99,16 +99,19 @@ static int Foo( vlc_object_t *p_this, char const *psz_cmd,
     var_Change( p_this, "honk", VLC_VAR_SETDEFAULT, &val, NULL );
 
     var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
+    free( val.psz_string );
 
     val.psz_string = "foo";
     var_Set( p_this, "honk", val );
 
     var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
+    free( val.psz_string );
 
     val.psz_string = "blork";
     var_Set( p_this, "honk", val );
 
     var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
+    free( val.psz_string );
 
     val.psz_string = "baz";
     var_Change( p_this, "honk", VLC_VAR_DELCHOICE, &val, NULL );




More information about the vlc-devel mailing list