ipconfig: Possible to have double unref
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 18 Jan 2012 10:48:35 +0000 (12:48 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 20 Jan 2012 00:46:59 +0000 (01:46 +0100)
commit0a2d884684c4201219c4cc1e96ad9918eb1a9ecf
tree1ef63ff6d6aa0924a444120ea049658f8d68ee88
parent28cfb9f31a6ef26df6917a9aa4f3c3eb676a5bc9
ipconfig: Possible to have double unref

Because we do not check that origin pointer is not this ipconfig,
it is possible that we might try to unref the ipconfig one time
too many.
Something like this was seen in the log file:

connmand[19208]: src/ipconfig.c:enable_ipv6()
connmand[19208]: src/ipconfig.c:__connman_ipconfig_unref() ipconfig 0x47502f0 refcount 0
connmand[19208]: src/ipconfig.c:__connman_ipconfig_disable() ipconfig 0x47502f0
connmand[19208]: src/ipconfig.c:disable_ipv6()
connmand[19208]: src/ipconfig.c:__connman_ipconfig_unref() ipconfig 0x47502f0 refcount -1
src/ipconfig.c