Index: libmpcodecs/ad_libvorbis.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_libvorbis.c,v retrieving revision 1.14 diff -u -r1.14 ad_libvorbis.c --- libmpcodecs/ad_libvorbis.c 18 Sep 2004 04:20:13 -0000 1.14 +++ libmpcodecs/ad_libvorbis.c 13 Oct 2004 16:27:31 -0000 @@ -164,6 +164,7 @@ static void uninit(sh_audio_t *sh) { struct ov_struct_st *ov = sh->context; + vorbis_dsp_clear(&ov->vd); vorbis_block_clear(&ov->vb); vorbis_info_clear(&ov->vi); free(ov); Index: libmpcodecs/vf_palette.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_palette.c,v retrieving revision 1.11 diff -u -r1.11 vf_palette.c --- libmpcodecs/vf_palette.c 23 Nov 2003 17:09:59 -0000 1.11 +++ libmpcodecs/vf_palette.c 13 Oct 2004 16:27:32 -0000 @@ -163,9 +163,14 @@ return vf->next->query_format(vf->next,best); } +static void uninit(vf_instance_t *vf) { + free(vf->priv); +} + static int open(vf_instance_t *vf, char* args){ unsigned int i; vf->config=config; + vf->uninit=uninit; vf->put_image=put_image; vf->query_format=query_format; vf->priv=malloc(sizeof(struct vf_priv_s)); Index: libmpdemux/demux_ogg.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v retrieving revision 1.58 diff -u -r1.58 demux_ogg.c --- libmpdemux/demux_ogg.c 28 Sep 2004 14:00:49 -0000 1.58 +++ libmpdemux/demux_ogg.c 13 Oct 2004 16:27:36 -0000 @@ -1424,8 +1424,13 @@ subcp_close(); #endif + ogg_sync_clear(&ogg_d->sync); if(ogg_d->subs) + { + for (i = 0; i < ogg_d->num_sub; i++) + ogg_stream_clear(&ogg_d->subs[i].stream); free(ogg_d->subs); + } if(ogg_d->syncpoints) free(ogg_d->syncpoints); if (ogg_d->text_ids) Index: libvo/font_load.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/font_load.c,v retrieving revision 1.28 diff -u -r1.28 font_load.c --- libvo/font_load.c 11 Jul 2004 12:42:19 -0000 1.28 +++ libvo/font_load.c 13 Oct 2004 16:27:37 -0000 @@ -56,10 +56,10 @@ int version=0; int first=1; -desc=malloc(sizeof(font_desc_t));if(!desc) return NULL; +desc=malloc(sizeof(font_desc_t));if(!desc) goto fail_out; memset(desc,0,sizeof(font_desc_t)); -f=fopen(fname,"rt");if(!f){ printf("font: can't open file: %s\n",fname); return NULL;} +f=fopen(fname,"rt");if(!f){ printf("font: can't open file: %s\n",fname); goto fail_out;} i = strlen (fname) - 9; if ((dn = malloc(i+1))){ @@ -98,10 +98,7 @@ if (first) { if (!sor[0] || sor[1] == 1 || (sor[0] == 'M' && sor[1] == 'Z') || (sor[0] == 0x1f && sor[1] == 0x8b) || (sor[0] == 1 && sor[1] == 0x66)) { printf("%s doesn't look like a font description, ignoring\n", fname); - fclose(f); - free(desc); - free(dn); - return NULL; + goto fail_out; } first = 0; } @@ -141,7 +138,7 @@ if(verbose) printf("font: Reading section: %s\n",section); if(strcmp(section,"[files]")==0){ ++fontdb; - if(fontdb>=16){ printf("font: Too many bitmaps defined!\n");return NULL;} + if(fontdb>=16){ printf("font: Too many bitmaps defined!\n");goto fail_out;} } continue; } @@ -160,20 +157,20 @@ char *default_dir=MPLAYER_DATADIR "/font"; if(pdb==2 && strcmp(p[0],"alpha")==0){ char *cp; - if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL; + if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out; snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s", desc->fpath,p[1]); if(!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){ free(cp); if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2))) - return NULL; + goto fail_out; snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s", default_dir,p[1]); if (!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){ printf("Can't load font bitmap: %s\n",p[1]); free(cp); - return NULL; + goto fail_out; } } free(cp); @@ -181,20 +178,20 @@ } if(pdb==2 && strcmp(p[0],"bitmap")==0){ char *cp; - if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL; + if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out; snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s", desc->fpath,p[1]); if(!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){ free(cp); if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2))) - return NULL; + goto fail_out; snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s", default_dir,p[1]); if (!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){ printf("Can't load font bitmap: %s\n",p[1]); free(cp); - return NULL; + goto fail_out; } } free(cp); @@ -245,17 +242,15 @@ } } printf("Syntax error in font desc: %s\n",sor); - free(desc); - fclose(f); - return NULL; + goto fail_out; } fclose(f); +f = NULL; if (first == 1) { printf("%s is empty or a directory, ignoring\n", fname); - free(desc); - return NULL; + goto fail_out; } //printf("font: pos of U = %d\n",desc->start[218]); @@ -263,7 +258,7 @@ for(i=0;i<=fontdb;i++){ if(!desc->pic_a[i] || !desc->pic_b[i]){ printf("font: Missing bitmap(s) for sub-font #%d\n",i); - return NULL; + goto fail_out; } //if(factor!=1.0f) { @@ -316,6 +311,17 @@ printf("Font %s loaded successfully! (%d chars)\n",fname,chardb); return desc; + +fail_out: + if (f) + fclose(f); + if (desc->fpath) + free(desc->fpath); + if (desc->name) + free(desc->name); + if (desc) + free(desc); + return NULL; } #if 0