If wri_font:: name is a const char*, why do you even attempt to free it
in IE_Imp_MSWrite::free_ffntb()? This is very bad! PLEASE be more
careful. You might use std::string there as well.
Le vendredi 04 mars 2011 à 11:07 +0100, cvs@abisource.com a écrit :
> Author: urmaslt
> Date: 2011-03-04 11:07:08 +0100 (Fri, 04 Mar 2011)
> New Revision: 29631
> 
> Modified:
>    abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.cpp
>    abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.h
> Log:
> More const.
> 
> Modified: abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.cpp
> ===================================================================
> --- abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.cpp	2011-03-04 09:16:15 UTC (rev 29630)
> +++ abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.cpp	2011-03-04 10:07:08 UTC (rev 29631)
> @@ -183,7 +183,7 @@
>  void IE_Imp_MSWrite::free_ffntb () 
>  {
>      for (UT_uint32 i=0; i < wri_fonts_count; i++) {
> -      free(wri_fonts[i].name);
> +      free((void*)wri_fonts[i].name);
>        wri_fonts[i].name = NULL;
>      }
>      free(wri_fonts);
> @@ -286,9 +286,9 @@
>  }
>  
> Modified: abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.h
> ===================================================================
> --- abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.h	2011-03-04 09:16:15 UTC (rev 29630)
> +++ abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.h	2011-03-04 10:07:08 UTC (rev 29631)
> @@ -39,8 +39,8 @@
>  /* the fonts */
>  typedef struct wri_font {
>  	short	ffid;
> -	char	*name;
> -	char	*codepage;
> +	const char *name;
> +	const char *codepage;
>  } wri_font;
Received on Fri Mar  4 11:44:19 2011
This archive was generated by hypermail 2.1.8 : Fri Mar 04 2011 - 11:44:19 CET