[EMAIL PROTECTED] wrote:

> dougm       01/12/17 19:24:49
> 
>   Modified:    xs/Apache/SubProcess Apache__SubProcess.h
>   Log:
>   plug av_argv memory leak
>   
>   Revision  Changes    Path
>   1.3       +3 -1      modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h
>   
>   Index: Apache__SubProcess.h
>   ===================================================================
>   RCS file: /home/cvs/modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- Apache__SubProcess.h    2001/12/18 03:21:22     1.2
>   +++ Apache__SubProcess.h    2001/12/18 03:24:49     1.3
>   @@ -120,7 +120,7 @@
>    
>            if (items == 3) {
>                if (SvROK(ST(2)) && SvTYPE(SvRV(ST(2))) == SVt_PVAV) {
>   -                av_argv = (AV*)SvRV(ST(2));
>   +                av_argv = (AV*)SvREFCNT_inc(SvRV(ST(2)));
>                }
>                else {
>                    Perl_croak(aTHX_ usage);
>   @@ -149,6 +149,8 @@
>            rc = modperl_spawn_proc_prog(r, command, &argv,
>                                         &script_in, &script_out,
>                                         &script_err);
>   +
>   +        SvREFCNT_dec(av_argv);

2 questions:

1. how did you detect it? (in-head detector, or something that I could 
have used too?)

2. why there was a memory leak here.

Thanks.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to