summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-20 09:30:06 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-20 09:30:06 +0000
commit7bf061987421c117ea5f8db9475ff899f75b9098 (patch)
tree135c4245ded488e91333d90bf20d9cdee25299f2 /cop.h
parentba2940cef5817468ce021916ff709a8ba665e2eb (diff)
downloadperl-7bf061987421c117ea5f8db9475ff899f75b9098.tar.gz
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
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cop.h b/cop.h
index 722e135e4b..91f8d45a10 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)