diff mbox

[1/3,libnftnl] chain: Fix bug. Check correct attribute

Message ID 20160616102012.32036-1-carlosfg@riseup.net
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Carlos Falgueras García June 16, 2016, 10:20 a.m. UTC
Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net>
---
 src/chain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pablo Neira Ayuso June 16, 2016, 12:51 p.m. UTC | #1
Applied, thanks for catching up this.

Please, include descriptions in your future patches.

Moreover, I'd suggest you use a title with a single sentence.

I have rewritten your patch title and description.

http://git.netfilter.org/libnftnl/commit/?id=2fee091b0dd1741a8a87cafceaa0091adadd2b46
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/chain.c b/src/chain.c
index f55dfa1..bfffbe0 100644
--- a/src/chain.c
+++ b/src/chain.c
@@ -219,7 +219,7 @@  int nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr,
 			xfree(c->dev);
 
 		c->dev = strdup(data);
-		if (!c->type)
+		if (!c->dev)
 			return -1;
 		break;
 	}