我们在下面的函数中发现了一个内存泄漏。如果我们将正确的消息作为函数的参数,SQL查询将被正确执行,并且内存保持不变。但是,如果消息的字符为',则(显然)无法执行,但内存开始增加。
int syslog_hwmod(unsigned short int type, unsigned short int err, const char *msg, const char *agent)
{
//Local variables:
int aux; //Auxiliary variable to check the returned erro
root@monitor:/opt/observium# service syslog-ng restart
Stopping system logging: syslog-ng.
Starting system logging: syslog-ngsyslog-ng: Error setting capabilities, capability management disabled; error='Operation not permitted'
root@monitor:/opt/observium# uname -a
Linux monitor 2.6.32-042s
在编译glibc 2.11时,我得到了以下错误。有没有办法解决这个问题。
In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:
../misc/syslog.c: In function ‘__vsyslog_chk’:
../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to ‘syslog’: function body not available
../misc/syslog.c:155: sorry, unimplemented: c