From: Nicholas Clark Date: Tue, 18 Apr 2006 11:18:12 +0000 (+0000) Subject: Coverity still thinks that there is a route through do_vop that can X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4154741246a440c7ccc4e633e6d115949af4ee56;p=p5sagit%2Fp5-mst-13.2.git Coverity still thinks that there is a route through do_vop that can leak resources. I believe that it's spotted that you can skip all the cases in the switch. Plug that hole. p4raw-id: //depot/perl@27883 --- diff --git a/doop.c b/doop.c index 08b6c23..202e320 100644 --- a/doop.c +++ b/doop.c @@ -1282,6 +1282,11 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) *SvEND(sv) = '\0'; Safefree(dcsave); break; + default: + if (sv == left || sv == right) + Safefree(dcorig); + Perl_croak(aTHX_ "panic: do_vop called for op %u (%s)", optype, + PL_op_name[optype]); } SvUTF8_on(sv); goto finish;