R->connection->addr_text.data leak or?

I’m writing a new module for ip stuffs and i noticed something new.

ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, “ip_checker:
%s”,
r->connection->addr_text.data);

2012/09/17 15:31:56 [debug] 17038#0: *10 ip_checker: xxx.156.62.158
2012/09/17 15:31:57 [debug] 17038#0: *11 ip_checker: xxx.156.62.158
2012/09/17 15:32:02 [debug] 17038#0: *12 ip_checker: xxx.30.52.71
2012/09/17 15:32:03 [debug] 17038#0: *13 ip_checker: xxx.30.52.70
2012/09/17 15:32:08 [debug] 17038#0: *14 ip_checker: xxx.30.52.7158 <<
wtf?
2012/09/17 15:32:08 [debug] 17038#0: *15 ip_checker: xxx.30.52.7158 <<
wtf?
2012/09/17 15:32:09 [debug] 17038#0: *16 ip_checker: xxx.30.52.7358 <<
wtf?

is this leak or something?

full module code
http://pastebin.com/kcuf0pVM

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,230779,230779#msg-230779

version 1.2.3
platform linux x86_64

configure parameters
./configure --prefix=/usr --add-module=…/ngx_ip_checker/ --with-debug

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,230779,230781#msg-230781

Hello!

On Mon, Sep 17, 2012 at 8:49 PM, Kalazath [email protected] wrote:

nginx mailing list
[email protected]alid
http://mailman.nginx.org/mailman/listinfo/nginx

you should ues “%V” in format message.

ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, “ip_checker:
%V”,
&r->connection->addr_text);

thank you.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,230779,231070#msg-231070

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs