diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-01-18 11:32:44 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-03-19 11:53:19 +0100 |
commit | 5a4ca00e1ae70ead90d5ddb57d6bf189a749ae9c (patch) | |
tree | 3a27a582f1532d8e87d7a91f0073deb67328269a /proto.h | |
parent | b8989050d30609050cd38eb5df7c4142da5f63bf (diff) | |
download | perl-5a4ca00e1ae70ead90d5ddb57d6bf189a749ae9c.tar.gz |
In S_regclass(), create listsv as a mortal, claiming a reference if needed.
The SV listsv is sometimes stored in an array generated near the end of
S_regclass(). In other cases it is not used, and it needs to be freed if
any of the warnings that S_regclass() can trigger turn out to be fatal.
The simplest solution to this problem is to declare it from the start as a
mortal, and claim a (new) reference to it if it is *not* to be freed. This
permits the removal of all other code related to ensuring that it is freed
at the right time, but not freed prematurely if a call to a warning returns.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6711,7 +6711,7 @@ STATIC regnode* S_regpiece(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U #define PERL_ARGS_ASSERT_REGPIECE \ assert(pRExC_state); assert(flagp) -PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, SV *free_me, const bool strict) +PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, const bool strict) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REGPPOSIXCC \ assert(pRExC_state) |