REVERT: add and use der_{malloc,free}

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22429 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-01-13 10:25:50 +00:00
parent f8574e2b52
commit 731d6e6df8
4 changed files with 5 additions and 17 deletions

View File

@@ -50,14 +50,14 @@ typedef struct heim_octet_string heim_any_set;
#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \
do { \
(BL) = length_##T((S)); \
(B) = der_malloc((BL)); \
(B) = malloc((BL)); \
if((B) == NULL) { \
(R) = ENOMEM; \
} else { \
(R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \
(S), (L)); \
if((R) != 0) { \
der_free((B)); \
free((B)); \
(B) = NULL; \
} \
} \