summaryrefslogtreecommitdiffstats
path: root/tests/nft-expr_masq-test.c
diff options
context:
space:
mode:
authorPhil Sutter <psutter@redhat.com>2016-08-12 14:39:50 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-12 15:36:04 +0200
commit9afae310b019aa497afb94833afc9a936bc38a1f (patch)
tree1ccb71e2d6749fd8f3e32b1838de2860dd1feb61 /tests/nft-expr_masq-test.c
parent1be3625e465d257e913a4cbb2b4329044a322e78 (diff)
utils: Don't return directly from SNPRINTF_BUFFER_SIZE
Apart from being a bad idea in general, the return statement contained in that macro in some cases leads to returning from functions without properly cleaning up, thereby causing memory leaks. Instead, just sanitize the value in 'ret' to not harm further calls of snprintf() (as 'len' will eventually just become zero). Cc: Arturo Borrero <arturo.borrero.glez@gmail.com> Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nft-expr_masq-test.c')
0 files changed, 0 insertions, 0 deletions