aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gpgsplit.c12
-rw-r--r--tools/shmtest.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/tools/gpgsplit.c b/tools/gpgsplit.c
index 8fc3fb346..3cdae05bf 100644
--- a/tools/gpgsplit.c
+++ b/tools/gpgsplit.c
@@ -205,7 +205,7 @@ create_filename (int pkttype)
static char *name;
if (!name)
- name = m_alloc (strlen (opt_prefix) + 100 );
+ name = xmalloc (strlen (opt_prefix) + 100 );
assert (pkttype < 1000 && pkttype >= 0 );
partno++;
@@ -376,9 +376,9 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
memset (&zs, 0, sizeof zs);
inbufsize = 2048;
- inbuf = m_alloc (inbufsize);
+ inbuf = xmalloc (inbufsize);
outbufsize = 8192;
- outbuf = m_alloc (outbufsize);
+ outbuf = xmalloc (outbufsize);
zs.avail_in = 0;
zinit_done = 0;
@@ -461,9 +461,9 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
memset (&bzs, 0, sizeof bzs);
inbufsize = 2048;
- inbuf = m_alloc (inbufsize);
+ inbuf = xmalloc (inbufsize);
outbufsize = 8192;
- outbuf = m_alloc (outbufsize);
+ outbuf = xmalloc (outbufsize);
bzs.avail_in = 0;
zinit_done = 0;
@@ -554,7 +554,7 @@ write_part ( const char *fname, FILE *fpin, unsigned long pktlen,
if (opt_secret_to_public
&& (pkttype == PKT_SECRET_KEY || pkttype == PKT_SECRET_SUBKEY))
{
- unsigned char *blob = m_alloc (pktlen);
+ unsigned char *blob = xmalloc (pktlen);
int i, len;
pkttype = pkttype == PKT_SECRET_KEY? PKT_PUBLIC_KEY:PKT_PUBLIC_SUBKEY;
diff --git a/tools/shmtest.c b/tools/shmtest.c
index 3ef763854..f48340508 100644
--- a/tools/shmtest.c
+++ b/tools/shmtest.c
@@ -83,7 +83,7 @@ do_get_string( int mode, const char *keyword, byte *area, size_t areasize )
memcpy( area+n+2, p, len );
area[n] = len >> 8;
area[n+1] = len;
- m_free(p);
+ xfree(p);
}
else { /* bool */
area[n] = 0;
@@ -118,7 +118,7 @@ main(int argc, char **argv)
for(n=0,i=1; i < argc; i++ )
n += strlen(argv[i]) + 1;
- p = m_alloc( 100 + n );
+ p = xmalloc( 100 + n );
strcpy( p, "../g10/gpg --status-fd 1 --run-as-shm-coprocess 0");
for(i=1; i < argc; i++ ) {
strcat(p, " " );
@@ -126,7 +126,7 @@ main(int argc, char **argv)
}
fp = popen( p, "r" );
- m_free( p );
+ xfree( p );
if( !fp )
log_error("popen failed: %s\n", strerror(errno));