summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-02 21:27:26 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-02 21:27:26 +0000
commit782a40f1181978d9bfe62418afdc2b6bc3857309 (patch)
treeb464cdf5801ce7786faf8b80bced607ce1f305ab /op.c
parent5e661f6a5e9caa656f01592947f38c9e56ec3d8a (diff)
downloadperl-782a40f1181978d9bfe62418afdc2b6bc3857309.tar.gz
We may not even have a list of slabs when Perl_Slab_Free is called.
p4raw-id: //depot/perl@30835
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/op.c b/op.c
index 47901c188a..1f9cb8f94f 100644
--- a/op.c
+++ b/op.c
@@ -235,10 +235,9 @@ Perl_Slab_Free(pTHX_ void *op)
# endif
#ifdef PERL_DEBUG_READONLY_OPS
+ U32 count = PL_slab_count;
/* Need to remove this slab from our list of slabs */
- {
- U32 count = PL_slab_count;
-
+ if (count) {
while (count--) {
if (PL_slabs[count] == slab) {
/* Found it. Move the entry at the end to overwrite it. */