aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/misc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/misc.c b/lib/misc.c
index c56b31f3..d77972e3 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -153,11 +153,11 @@ static const htmlentity_t ent[] =
void strip_html( char *in )
{
char *start = in;
- char *out = g_malloc( strlen( in ) + 1 );
+ char out[strlen(in)+1];
char *s = out, *cs;
int i, matched;
- memset( out, 0, strlen( in ) + 1 );
+ memset( out, 0, sizeof( out ) );
while( *in )
{
@@ -219,7 +219,6 @@ void strip_html( char *in )
}
strcpy( start, out );
- g_free( out );
}
char *escape_html( const char *html )