summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2bd7636fb0..905809f111 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -516,6 +516,19 @@ void *MemMove(void *dest,void *src,int size)
}
#endif
+/* ************************************************************************* **
+ * Duplicate a block of memory.
+ * ************************************************************************* **
+ */
+void *mem_dup( void *from, int size )
+ {
+ void *tmp;
+
+ tmp = malloc( size );
+ if( NULL != tmp )
+ (void)memcpy( tmp, from, size );
+ return( tmp );
+ } /* mem_dup */
/****************************************************************************
prompte a dptr (to make it recently used)