diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-03 10:24:45 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-03 10:24:45 +0100 |
commit | 149e86b8427359042830faddad10a103f51184da (patch) | |
tree | 7d3539cb51a3e6d9dd517680ad18ed2c7761cbd2 /source3 | |
parent | 2242f2673c66bcce530e5134920ed041e6b31af7 (diff) | |
download | samba-149e86b8427359042830faddad10a103f51184da.tar.gz samba-149e86b8427359042830faddad10a103f51184da.tar.bz2 samba-149e86b8427359042830faddad10a103f51184da.zip |
Trivial simplification
... things you come across when you review code
(This used to be commit 1e006bcfb15d44ecb81b6994c588d30d87b48033)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_sock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 013a5fe29f..b92cd3d624 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -1864,8 +1864,7 @@ static void store_nc(const struct name_addr_pair *nc) DATA_BLOB tmp; size_t namelen = strlen(nc->name); - tmp.length = sizeof(nc->ss) + namelen + 1; - tmp.data = (uint8_t *)SMB_MALLOC(tmp.length); + tmp = data_blob(NULL, sizeof(nc->ss) + namelen + 1); if (!tmp.data) { return; } @@ -1875,7 +1874,7 @@ static void store_nc(const struct name_addr_pair *nc) memcache_add(NULL, SINGLETON_CACHE, data_blob_string_const("get_peer_name"), tmp); - SAFE_FREE(tmp.data); + data_blob_free(&tmp); } /******************************************************************* |