summaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2000-01-24 12:55:49 +0100
committerWerner Koch <wk@gnupg.org>2000-01-24 12:55:49 +0100
commit0070faa0ffd5c366bc20f477a4838b701c20b063 (patch)
tree4fb8a63c5f2b7cb4b33a51247bdc8961caa89720 /g10/build-packet.c
parentSee ChangeLog: Fri Dec 31 14:06:56 CET 1999 Werner Koch (diff)
downloadgnupg2-0070faa0ffd5c366bc20f477a4838b701c20b063.tar.xz
gnupg2-0070faa0ffd5c366bc20f477a4838b701c20b063.zip
See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner Koch
Diffstat (limited to 'g10/build-packet.c')
-rw-r--r--g10/build-packet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 84ca3a8db..34fd4ae1d 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -29,7 +29,7 @@
#include "iobuf.h"
#include "util.h"
#include "dummy-cipher.h"
-#include "memory.h"
+#include <gcrypt.h>
#include "options.h"
#include "main.h"
@@ -667,16 +667,16 @@ build_sig_subpkt( PKT_signature *sig, sigsubpkttype_t type,
| sig->hashed_data[1]) : 0;
n = n0 + nlen + 1 + buflen; /* length, type, buffer */
realloced = !!sig->hashed_data;
- data = sig->hashed_data ? m_realloc( sig->hashed_data, n+2 )
- : m_alloc( n+2 );
+ data = sig->hashed_data ? gcry_xrealloc( sig->hashed_data, n+2 )
+ : gcry_xmalloc( n+2 );
}
else {
n0 = sig->unhashed_data ? ((*sig->unhashed_data << 8)
| sig->unhashed_data[1]) : 0;
n = n0 + nlen + 1 + buflen; /* length, type, buffer */
realloced = !!sig->unhashed_data;
- data = sig->unhashed_data ? m_realloc( sig->unhashed_data, n+2 )
- : m_alloc( n+2 );
+ data = sig->unhashed_data ? gcry_xrealloc( sig->unhashed_data, n+2 )
+ : gcry_xmalloc( n+2 );
}
if( critical )
@@ -707,12 +707,12 @@ build_sig_subpkt( PKT_signature *sig, sigsubpkttype_t type,
if( hashed ) {
if( !realloced )
- m_free(sig->hashed_data);
+ gcry_free(sig->hashed_data);
sig->hashed_data = data;
}
else {
if( !realloced )
- m_free(sig->unhashed_data);
+ gcry_free(sig->unhashed_data);
sig->unhashed_data = data;
}
}