diff options
Diffstat (limited to 'icc/iccstd.c')
-rwxr-xr-x[-rw-r--r--] | icc/iccstd.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/icc/iccstd.c b/icc/iccstd.c index 3f7966e..1cb63eb 100644..100755 --- a/icc/iccstd.c +++ b/icc/iccstd.c @@ -440,5 +440,24 @@ icc *new_icc(void) { return p; } +/* ------------------------------------------------- */ + +/* Create an icmMD5 with the std allocator */ +icmMD5 *new_icmMD5(void) { + icmMD5 *p; + icmAlloc *al; /* memory allocator */ + + if ((al = new_icmAllocStd()) == NULL) + return NULL; + + if ((p = new_icmMD5_a(al)) == NULL) { + al->del(al); + return NULL; + } + + p->del_al = 1; /* Get md5->del to cleanup allocator */ + return p; +} + #endif /* defined(SEPARATE_STD) || defined(COMBINED_STD) */ |