1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Fix the uninitialised variable, but more importantly fix the SEGFAULT.

Merge for 2.2.2

Should TDB cope with TDB pointers itself?

Andrew Bartlett
(This used to be commit 27f0510a0b)
This commit is contained in:
Andrew Bartlett 2001-09-26 11:44:25 +00:00
parent f12ebc00a8
commit 1ef468f805

View File

@ -727,7 +727,7 @@ BOOL pdb_delete_sam_account(char *sname)
static BOOL tdb_update_sam(SAM_ACCOUNT* newpwd, BOOL override, int flag)
{
TDB_CONTEXT *pwd_tdb;
TDB_CONTEXT *pwd_tdb = NULL;
TDB_DATA key, data;
uint8 *buf = NULL;
fstring keystr;
@ -780,7 +780,7 @@ static BOOL tdb_update_sam(SAM_ACCOUNT* newpwd, BOOL override, int flag)
if (!pwd_tdb) {
DEBUG(0, ("Unable to create TDB passwd (passdb.tdb) !!!\n"));
ret = False;
goto done;
goto reallydone;
}
newtdb = True;
}
@ -816,6 +816,8 @@ done:
/* cleanup */
tdb_close (pwd_tdb);
reallydone:
SAFE_FREE(buf);
return (ret);
}