summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-03 10:24:45 +0100
committerVolker Lendecke <vl@samba.org>2008-01-03 10:24:45 +0100
commit149e86b8427359042830faddad10a103f51184da (patch)
tree7d3539cb51a3e6d9dd517680ad18ed2c7761cbd2
parent2242f2673c66bcce530e5134920ed041e6b31af7 (diff)
downloadsamba-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)
-rw-r--r--source3/lib/util_sock.c5
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);
}
/*******************************************************************