mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Converted all m_free to xfree etc.
This commit is contained in:
parent
cd570629b2
commit
a1cdf3c75f
112 changed files with 2067 additions and 1813 deletions
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue