dbus: Avoid theoretical memory leaks with duplicated dict entries
authorJouni Malinen <j@w1.fi>
Thu, 12 Jun 2014 14:36:56 +0000 (17:36 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 12 Jun 2014 16:45:06 +0000 (19:45 +0300)
commitbeb9e1171e71b160ddf41b552d245ffdd0c4f76e
tree37cb0f45373ac2a30c12082dce01e0f2c689c321
parentceb4cd89c9709217d52a493d483d3d76ef3cbd44
dbus: Avoid theoretical memory leaks with duplicated dict entries

If a dict would include duplicated items, the parsing code here would
have leaked memory by overwriting old os_strdup() result with the new
one. Fix this by explicitly freeing the previous entry. This addresses
CID 62852, CID 62851, CID 62850, CID 62849, CID 62847, CID 62846.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/dbus/dbus_new_handlers.c
wpa_supplicant/dbus/dbus_old_handlers.c