diff options
author | Jeremy Allison <jra@samba.org> | 2013-08-02 15:03:39 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-08-27 11:36:39 +0200 |
commit | 6b6cab72c12ac1bb5fadb31d56ece0e0ef37613c (patch) | |
tree | aa3109b822522b1975b5a92225109d3141975e1d | |
parent | c41ffd5e772da6777c4fd60a77ef4658a89a512d (diff) | |
download | samba-6b6cab72c12ac1bb5fadb31d56ece0e0ef37613c.tar.gz |
Fix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / winbind
Don't use talloc_tos() in something that can be linked to in pam_winbindd.so
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Sat Aug 24 02:28:28 CEST 2013 on sn-devel-104
(cherry picked from commit 9423d5afb71e272298f4858d82f436e19ee2b07f)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue Aug 27 11:36:39 CEST 2013 on sn-devel-104
-rw-r--r-- | source3/lib/util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 93aab3c2ad8..db46ad30161 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1487,10 +1487,12 @@ char *myhostname(void) char *myhostname_upper(void) { - char *name; static char *ret; if (ret == NULL) { - name = get_myname(talloc_tos()); + char *name = get_myname(NULL); + if (name == NULL) { + return NULL; + } ret = strupper_talloc(NULL, name); talloc_free(name); } |