diff mbox

[libnftnl] buffer: fix a bug in nft_buf_close passing the tag to close the xml elements.

Message ID 1423512596-29777-1-git-send-email-alvaroneay@gmail.com
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Alvaro Neira Feb. 9, 2015, 8:09 p.m. UTC
Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 src/buffer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/src/buffer.c b/src/buffer.c
index d64f944..4cedb9e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -75,7 +75,7 @@  int nft_buf_close(struct nft_buf *b, int type, const char *tag)
 {
 	switch (type) {
 	case NFT_OUTPUT_XML:
-		return nft_buf_put(b, "</%s>");
+		return nft_buf_put(b, "</%s>", tag);
 	case NFT_OUTPUT_JSON:
 		/* Remove trailing comma in json */
 		if (b->size > 0 && b->buf[b->size - 1] == ',') {