From 6a89b59ca6187ef6e06124c2aa729be18b43bb75 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 18 Oct 2008 18:09:04 +0200 Subject: Add TALLOC_CTX pointer to strhex_to_data_blob for consistency with Samba 3. --- lib/util/util.h | 2 +- lib/util/util_str.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/util') diff --git a/lib/util/util.h b/lib/util/util.h index 47adf067f0..38b59862fc 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -241,7 +241,7 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex); /** * Parse a hex string and return a data blob. */ -_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(const char *strhex) ; +_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ; /** * Routine to print a buffer as HEX digits, into an allocated string. diff --git a/lib/util/util_str.c b/lib/util/util_str.c index 9ea6403c52..389b289bfb 100644 --- a/lib/util/util_str.c +++ b/lib/util/util_str.c @@ -216,9 +216,9 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex) /** * Parse a hex string and return a data blob. */ -_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(const char *strhex) +_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) { - DATA_BLOB ret_blob = data_blob(NULL, strlen(strhex)/2+1); + DATA_BLOB ret_blob = data_blob(mem_ctx, strlen(strhex)/2+1); ret_blob.length = strhex_to_str((char *)ret_blob.data, strlen(strhex), -- cgit