From 7bf061987421c117ea5f8db9475ff899f75b9098 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 20 Dec 2006 09:30:06 +0000 Subject: [PATCH] Don't free the original label string when assigning it to cop_label, since it comes directly from the parser. (That was making op/goto.t fail under threads and without debugging on some platforms.) p4raw-id: //depot/perl@29600 --- cop.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cop.h b/cop.h index 722e135..91f8d45 100644 --- a/cop.h +++ b/cop.h @@ -187,10 +187,11 @@ struct cop { # define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME_get(hv) : NULL) # define CopSTASH_eq(c,hv) ((hv) && stashpv_hvname_match(c,hv)) # define CopLABEL(c) ((c)->cop_label) +/* Don't free the original label here, it will be freed by the parser */ # ifdef NETWARE -# define CopLABEL_set(c,pv) ((CopLABEL(c) = ((pv) ? savepv(pv) : NULL)), Safefree(pv), ((pv) = NULL)) +# define CopLABEL_set(c,pv) (CopLABEL(c) = ((pv) ? savepv(pv) : NULL)) # else -# define CopLABEL_set(c,pv) ((CopLABEL(c) = savesharedpv(pv)), Safefree(pv), ((pv) = NULL)) +# define CopLABEL_set(c,pv) (CopLABEL(c) = savesharedpv(pv)) # endif # ifdef NETWARE # define CopSTASH_free(c) SAVECOPSTASH_FREE(c) -- 2.7.4