From aea901728e233d6d1b4ef9b773f198f20fa39599 Mon Sep 17 00:00:00 2001 From: Wouter Coekaerts Date: Thu, 29 Sep 2005 21:02:31 +0000 Subject: [PATCH] Fix compilation with gcc4 and --with-gc, Patch by Michael Poole git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4013 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/ui/Formats.xs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/perl/ui/Formats.xs b/src/perl/ui/Formats.xs index 8450c667..53c45d1b 100644 --- a/src/perl/ui/Formats.xs +++ b/src/perl/ui/Formats.xs @@ -3,7 +3,8 @@ static int magic_free_text_dest(pTHX_ SV *sv, MAGIC *mg) { TEXT_DEST_REC *dest = (TEXT_DEST_REC *) mg->mg_ptr; - g_free((char *) dest->target); + char *target = (char *) dest->target; + g_free(target); g_free(dest); mg->mg_ptr = NULL; sv_setiv(sv, 0);