Fix bug 7045 - Bad (non memory copying) interfaces in smbc_setXXXX calls.
authorJeremy Allison <jra@samba.org>
Sat, 16 Jan 2010 01:49:56 +0000 (17:49 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 18 Jan 2010 09:28:05 +0000 (10:28 +0100)
commit1d9dc38aec417c8ccc9fa34d32015ee57d877ba9
tree09ac3c477f308027fa8f6baded7080e0fc283d69
parentb8ff43eedef4315595e6b4c4467e8e2d8d19ffc4
Fix bug 7045 - Bad (non memory copying) interfaces in smbc_setXXXX calls.

In smbc_free_context libsmbclient just called free() on the string options
so it assumes the callers have malloced them before setting them via smbc_set
calls.

Change to correctly malloc/free string options to the library.
Protect against SMB_STRDUP of null.

Contains 2d41b1ab78639abe4ae030ff482573f464564dd7 and
f85b6ee90b88c7f7b2a92c8a5f3e2ebe59c1087b from master.

Jeremy
source3/libsmb/libsmb_context.c
source3/libsmb/libsmb_setget.c