[vlc-devel] commit: Fixed a memory leak in AspectCallback. (Laurent Aimar )
git version control
git at videolan.org
Tue Jul 22 00:27:46 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jul 21 23:14:47 2008 +0200| [24e7b2dd236e659a004f9897411b35ee6de010c7]
Fixed a memory leak in AspectCallback.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24e7b2dd236e659a004f9897411b35ee6de010c7
---
src/video_output/vout_intf.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 78a3c63..3a496b8 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -1126,8 +1126,12 @@ static int AspectCallback( vlc_object_t *p_this, char const *psz_cmd,
i_aspect_num, i_aspect_den,
p_vout->fmt_in.i_sar_num, p_vout->fmt_in.i_sar_den );
- var_Get( p_vout, "crop", &val );
- return CropCallback( p_this, "crop", val, val, 0 );
+ if( var_Get( p_vout, "crop", &val ) )
+ return VLC_EGENERIC;
+
+ int i_ret = CropCallback( p_this, "crop", val, val, 0 );
+ free( val.psz_string );
+ return i_ret;
}
static int OnTopCallback( vlc_object_t *p_this, char const *psz_cmd,
More information about the vlc-devel
mailing list