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

@@ -154,14 +154,14 @@ init_generate (const char *filename, const char *base)
fputs("#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \\\n"
" do { \\\n"
" (BL) = length_##T((S)); \\\n"
" (B) = der_malloc((BL)); \\\n"
" (B) = malloc((BL)); \\\n"
" if((B) == NULL) { \\\n"
" (R) = ENOMEM; \\\n"
" } else { \\\n"
" (R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \\\n"
" (S), (L)); \\\n"
" if((R) != 0) { \\\n"
" der_free((B)); \\\n"
" free((B)); \\\n"
" (B) = NULL; \\\n"
" } \\\n"
" } \\\n"