From: RĂ©mi Duraffort Date: Wed, 13 Aug 2008 22:28:00 +0000 (+0200) Subject: Hum fix a memleak in test4 ... X-Git-Tag: 0.9.0~347 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ffbd92724a257d0c92eb59032901803109100d26;p=vlc Hum fix a memleak in test4 ... --- diff --git a/modules/misc/testsuite/test4.c b/modules/misc/testsuite/test4.c index 7ce10159a5..170992ee72 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 );