1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source3/lib
Corinna Vinschen a0bd9d97a3 Tiny memory leak in lib/version.c
Hi,

while implementing the extra_info version stuff, it occured to me that
samba_version_string() potentially allocates memory which is unused but
never free'd.

If SAMBA_VERSION_VENDOR_PATCH is defined, a second call to asprintf
takes place.  The result is stored in tmp_version.  Afterwards,
samba_version is set to tmp_version without free'ing samba_version
first.  Looks like a simple free(samba_version) is missing.  Patch
against 3.2-test below.

Ok, this only happens once over the lifetime of the application, so it's
no big deal, but I though it doesn't hurt to mention it.

Corinna

	* lib/version.c (samba_version_string): Free samba_version
	before setting to tmp_version.
(This used to be commit 373a23d48f)
2008-01-19 19:30:16 +01:00
..
ldb Remove the char[1024] strings from dynconfig. Replace 2007-12-10 11:30:37 -08:00
netapi Fix the build w/o ADS. 2008-01-18 08:50:33 +01:00
nss_wrapper nss_wrapper: Fix some warnings 2007-11-09 15:16:59 +01:00
replace Revert "Host SerNet-AIX has __ss_family instead of ss_family in sockaddr_storage" 2008-01-18 17:02:13 +01:00
socket_wrapper Fix initialization warnings. 2007-12-21 12:11:23 -08:00
talloc Fix a c++ warning 2008-01-10 12:28:20 +01:00
tdb merged changes from v4-0-test 2008-01-18 15:46:15 +11:00
access.c Add a singleton cache 2007-12-21 09:58:20 +01:00
account_pol.c Patch 2 of 3 from Debian Samba packagers: 2007-11-01 15:53:44 -04:00
adt_tree.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
afs_settoken.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
afs.c afs: Use talloc_stackframe() instead of talloc_init() 2008-01-19 13:17:09 +01:00
arc4.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
audit.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
bitmap.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
charcnv.c Fixup hot paths - add macro for toupper (c < 0x80). 2008-01-09 17:32:26 -08:00
clobber.c Cope with valgrind > 3.2.x. 2007-12-15 23:05:30 -08:00
conn_tdb.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
crc32.c r12043: It's amazing the warnings you find when compiling on a 64-bit 2007-10-10 11:05:42 -05:00
ctdbd_conn.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
data_blob.c Make data_blob_string_const return null terminated strings 2007-12-21 09:58:20 +01:00
dbwrap_ctdb.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
dbwrap_file.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
dbwrap_rbt.c Restructure dbwrap_rbt 2008-01-12 20:11:10 +01:00
dbwrap_tdb.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
dbwrap_util.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
dbwrap.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
debug.c In gfree_debugsyms() free the format_bufr as well. 2008-01-07 12:48:21 +01:00
display_dsdcinfo.c r24742: Add experimental DsGetDcName() call (will be used by krb5 locator for fine 2007-10-10 12:30:16 -05:00
display_sec.c More static pstring elimination. 2007-12-17 18:32:27 -08:00
dmallocmsg.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
dprintf.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
dummyroot.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
dummysmbd.c Refactor the crypto code after a very helpful conversation 2008-01-04 12:56:23 -08:00
errmap_unix.c r23845: Second part of the fix for #4777. Looks like on AIX opendir 2007-10-10 12:28:34 -05:00
events.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
fault.c Remove the char[1024] strings from dynconfig. Replace 2007-12-10 11:30:37 -08:00
file_id.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
fsusage.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
gencache.c don't store cache_readonly in gencache 2007-12-28 17:09:57 +01:00
genrand.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
hmacmd5.c r24993: Apply some const 2007-10-10 12:30:32 -05:00
iconv.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
interface.c Fix bug in writing names into gencache 2007-10-25 19:07:25 -07:00
interfaces.c Interface detection should not go through the socket wrapper 2007-12-25 12:35:44 +01:00
ldap_escape.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
md4.c Remove some statics from md4.c 2007-12-21 09:58:20 +01:00
md5.c
memcache.c Convert get_root_nt_token to memcache 2007-12-28 17:24:39 +01:00
messages_ctdbd.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
messages_local.c Remove a static, and "signal_received" needs to be sig_atomic_t 2007-12-05 14:39:07 +01:00
messages.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
module.c CID 458. Don't leak dlopen handles on failing to load 2008-01-12 00:15:46 -08:00
ms_fnmatch.c Save one popular malloc 2008-01-09 00:10:43 +01:00
packet.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
pam_errors.c r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
pidfile.c Remove the char[1024] strings from dynconfig. Replace 2007-12-10 11:30:37 -08:00
popt_common.c Add general '-e' option to enable smb encryption 2008-01-05 00:23:35 -08:00
privileges_basic.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
privileges.c Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS. 2008-01-09 01:47:10 +01:00
rbtree.c Make the Linux rbtrees compile within Samba 2007-12-10 16:06:32 +01:00
readline.c Remove pstrings from client/client.c by doing a large rewrite. 2007-12-06 17:16:33 -08:00
recvfile.c Make explicit draining the socket on RECVFILE. Add 2007-10-31 14:01:35 -07:00
repdir.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
secace.c Remove tiny code duplication 2007-12-29 23:12:51 +01:00
secacl.c Some C++ fixes 2007-12-21 09:58:21 +01:00
secdesc.c Remove tiny code duplication 2007-12-29 23:13:26 +01:00
select.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
sendfile.c r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
server_mutex.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
sharesec.c use talloc_tos() in share_access_check() 2008-01-10 13:19:59 +01:00
signal.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
smbldap_util.c s/sid_to_string/sid_to_fstring/ 2007-12-15 22:47:30 +01:00
smbldap.c Remove smbldap_get_single_pstring() and all pstrings 2007-11-14 16:05:42 -08:00
smbrun.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
sock_exec.c Fix connect(2) callers to use correct sockaddr size. 2007-12-09 13:28:00 -08:00
substitute.c Add free_local_machine_name(). 2008-01-07 14:53:07 +01:00
sysacls.c Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD(). 2008-01-08 01:54:19 +01:00
sysquotas_4A.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
sysquotas_linux.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
sysquotas_xfs.c r23786: Use linux/dqblk_xfs.h rather than a private copy of this header in the 2007-10-10 12:28:24 -05:00
sysquotas.c More pstring removal. This one was tricky. I had to add 2007-11-15 14:19:52 -08:00
system_smbd.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
system.c Many systems don't have sa_len as part of struct sockaddr. 2007-12-09 14:59:07 -08:00
talloc_stack.c Form a proper hierarchy in talloc_stack 2008-01-10 09:54:06 +01:00
tallocmsg.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
time.c Some C++ warnings 2007-12-21 09:58:20 +01:00
ufc.c r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
username.c Remove Get_Pwnam and its associated static variable 2007-12-19 21:09:10 +01:00
util_file.c More pstring removal. This one was tricky. I had to add 2007-11-15 14:19:52 -08:00
util_nscd.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
util_nttoken.c r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
util_pw.c Convert the pwnam cache to memcache 2007-12-21 09:58:20 +01:00
util_reg_api.c r25417: Use DBGC_REGISTRY class. 2007-10-10 12:31:04 -05:00
util_reg_smbconf.c Change registry_create_admin_token() to return NTSTATUS. 2008-01-09 01:47:10 +01:00
util_reg.c Add "config backend" to the parameters forbidden in registry config. 2008-01-16 17:31:44 +01:00
util_seaccess.c Some C++ fixes 2007-12-21 09:58:21 +01:00
util_sec.c RIP BOOL. Convert BOOL -> bool. I found a few interesting 2007-10-18 17:40:25 -07:00
util_sid.c Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS. 2008-01-09 01:47:10 +01:00
util_sock.c Fix IPv6 bug #5204, which caused krb5 DNS lookups 2008-01-16 13:21:46 -08:00
util_str.c util_str: Don't return memory from talloc_tos(), use mem_ctx instead. 2008-01-19 02:20:16 +01:00
util_tdb.c Change tdb_unpack "P" to return a malloc'ed string rather 2007-12-03 14:54:06 -08:00
util_transfer_file.c Move transfer_file and transfer_file_internal to a module of their own. 2008-01-10 14:31:25 +01:00
util_unistr.c get rid of doschar_table[] 2007-12-16 10:57:01 -08:00
util_uuid.c Remove some statics 2007-11-27 14:18:47 +01:00
util.c Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb) 2008-01-16 12:09:48 +03:00
version.c Tiny memory leak in lib/version.c 2008-01-19 19:30:16 +01:00
winbind_util.c From Alexander Bokovoy 2008-01-14 11:06:46 -08:00
wins_srv.c Remove more static data from lib/util_sock.c and 2007-11-03 22:34:46 -07:00
xfile.c r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00