[PATCH 1/4] w1: fix netlink refcnt leak on error path

2014-02-02 Thread David Fries
If the message type is W1_MASTER_CMD or W1_SLAVE_CMD, then a reference is taken when searching for the slave or master device. If there isn't any following data m->len (mlen is a copy) is 0 and packing up the message for later execution is skipped leaving nothing to decrement the reference

[PATCH 1/4] w1: fix netlink refcnt leak on error path

2014-02-02 Thread David Fries
If the message type is W1_MASTER_CMD or W1_SLAVE_CMD, then a reference is taken when searching for the slave or master device. If there isn't any following data m-len (mlen is a copy) is 0 and packing up the message for later execution is skipped leaving nothing to decrement the reference counts.