summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-08 11:53:38 +0100
committerGünther Deschner <gd@samba.org>2008-01-08 11:59:01 +0100
commita01dc30db7cb16c794f5daf23ad2df607f891626 (patch)
treefb8d1955592469b36b4c8f4a715e26d733681341 /source3/lib
parentab216a1b4ea585faa42be4908a24a475173683d2 (diff)
downloadsamba-a01dc30db7cb16c794f5daf23ad2df607f891626.tar.gz
samba-a01dc30db7cb16c794f5daf23ad2df607f891626.tar.xz
samba-a01dc30db7cb16c794f5daf23ad2df607f891626.zip
Add NetApiBufferFree() to libnetapi.
Guenther (This used to be commit c49196954d38f0c2851abbfe25086cd6fe660a2e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/netapi.c14
-rw-r--r--source3/lib/netapi/netapi.h5
2 files changed, 19 insertions, 0 deletions
diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c
index 35161053533..d4cb3a9fe2f 100644
--- a/source3/lib/netapi/netapi.c
+++ b/source3/lib/netapi/netapi.c
@@ -224,3 +224,17 @@ const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx)
{
return ctx->error_string;
}
+
+/****************************************************************
+****************************************************************/
+
+NET_API_STATUS NetApiBufferFree(void *buffer)
+{
+ if (!buffer) {
+ return W_ERROR_V(WERR_INSUFFICIENT_BUFFER);
+ }
+
+ talloc_free(buffer);
+
+ return NET_API_STATUS_SUCCESS;
+}
diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h
index 46dd8e1a24b..4a40b32fc95 100644
--- a/source3/lib/netapi/netapi.h
+++ b/source3/lib/netapi/netapi.h
@@ -53,6 +53,11 @@ const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx);
/****************************************************************
****************************************************************/
+NET_API_STATUS NetApiBufferFree(void *buffer);
+
+/****************************************************************
+****************************************************************/
+
/* wkssvc */
NET_API_STATUS NetJoinDomain(const char *server,
const char *domain,