summaryrefslogtreecommitdiffstats
path: root/source/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/util.c')
-rw-r--r--source/lib/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c
index 2bd7636fb06..905809f1111 100644
--- a/source/lib/util.c
+++ b/source/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)