diff options
Diffstat (limited to 'g10/status.c')
-rw-r--r-- | g10/status.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/g10/status.c b/g10/status.c index 079c0dbd9..3eeec4648 100644 --- a/g10/status.c +++ b/g10/status.c @@ -43,7 +43,7 @@ #include "ttyio.h" #include "options.h" #include "main.h" -#include "memory.h" +#include <gcrypt.h> #include "i18n.h" static int fd = -1; @@ -257,7 +257,7 @@ do_shm_get( const char *keyword, int hidden, int bool ) if( bool ) return p[0]? "" : NULL; - string = hidden? m_alloc_secure( n+1 ) : m_alloc( n+1 ); + string = hidden? gcry_xmalloc_secure( n+1 ) : gcry_xmalloc( n+1 ); memcpy(string, p, n ); string[n] = 0; /* make sure it is a string */ if( hidden ) /* invalidate the memory */ @@ -292,7 +292,7 @@ cpr_get( const char *keyword, const char *prompt ) for(;;) { p = tty_get( prompt ); if( *p=='?' && !p[1] && !(keyword && !*keyword)) { - m_free(p); + gcry_free(p); display_online_help( keyword ); } else @@ -307,7 +307,7 @@ cpr_get_utf8( const char *keyword, const char *prompt ) p = cpr_get( keyword, prompt ); if( p ) { char *utf8 = native_to_utf8( p ); - m_free( p ); + gcry_free( p ); p = utf8; } return p; @@ -325,7 +325,7 @@ cpr_get_hidden( const char *keyword, const char *prompt ) for(;;) { p = tty_get_hidden( prompt ); if( *p == '?' && !p[1] ) { - m_free(p); + gcry_free(p); display_online_help( keyword ); } else @@ -358,13 +358,13 @@ cpr_get_answer_is_yes( const char *keyword, const char *prompt ) p = tty_get( prompt ); trim_spaces(p); /* it is okay to do this here */ if( *p == '?' && !p[1] ) { - m_free(p); + gcry_free(p); display_online_help( keyword ); } else { tty_kill_prompt(); yes = answer_is_yes(p); - m_free(p); + gcry_free(p); return yes; } } @@ -384,13 +384,13 @@ cpr_get_answer_yes_no_quit( const char *keyword, const char *prompt ) p = tty_get( prompt ); trim_spaces(p); /* it is okay to do this here */ if( *p == '?' && !p[1] ) { - m_free(p); + gcry_free(p); display_online_help( keyword ); } else { tty_kill_prompt(); yes = answer_is_yes_no_quit(p); - m_free(p); + gcry_free(p); return yes; } } |