diff options
author | Jeremy Allison <jra@samba.org> | 2007-03-01 02:43:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:16 -0500 |
commit | 8e00e9d7a6114089fc176bc3446c6c97a01543d6 (patch) | |
tree | 9c5b58be176c12282be1226dd4369cb80a66bb6b /source3/libsmb | |
parent | fae01b48994fd3168fd921af68dab1b4003adc49 (diff) | |
download | samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.tar.gz samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.tar.bz2 samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.zip |
r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
(This used to be commit df07a662e32367a52c1e8473475423db2ff5bc51)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliquota.c | 2 | ||||
-rw-r--r-- | source3/libsmb/doserr.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c index 25c36c214f..5627d28bb5 100644 --- a/source3/libsmb/cliquota.c +++ b/source3/libsmb/cliquota.c @@ -323,11 +323,13 @@ BOOL cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { DEBUG(0,("talloc_zero() failed\n")); + talloc_destroy(mem_ctx); return (-1); } if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { DEBUG(0,("talloc_zero() failed\n")); + talloc_destroy(mem_ctx); return (-1); } diff --git a/source3/libsmb/doserr.c b/source3/libsmb/doserr.c index 8628db3abc..414c2d4916 100644 --- a/source3/libsmb/doserr.c +++ b/source3/libsmb/doserr.c @@ -68,6 +68,7 @@ werror_code_struct dos_errs[] = { "WERR_DFS_CANT_CREATE_JUNCT", WERR_DFS_CANT_CREATE_JUNCT }, { "WERR_MACHINE_LOCKED", WERR_MACHINE_LOCKED }, { "WERR_NO_LOGON_SERVERS", WERR_NO_LOGON_SERVERS }, + { "WERR_LOGON_FAILURE", WERR_LOGON_FAILURE }, { "WERR_NO_SUCH_DOMAIN", WERR_NO_SUCH_DOMAIN }, { "WERR_INVALID_SECURITY_DESCRIPTOR", WERR_INVALID_SECURITY_DESCRIPTOR }, { "WERR_INVALID_OWNER", WERR_INVALID_OWNER }, @@ -83,8 +84,9 @@ werror_code_struct dos_errs[] = }; /***************************************************************************** - returns a DOS error message. not amazingly helpful, but better than a number. + Returns a DOS error message. not amazingly helpful, but better than a number. *****************************************************************************/ + const char *dos_errstr(WERROR werror) { static pstring msg; |