mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
use XP_MALLOC rather than MemPtrNew
This commit is contained in:
parent
055311ed49
commit
549b89049c
1 changed files with 3 additions and 2 deletions
|
@ -2909,7 +2909,7 @@ askFromStream( PalmAppGlobals* globals, XWStreamCtxt* stream, XP_S16 titleID,
|
|||
|
||||
XP_ASSERT( nBytes < maxFieldTextLen );
|
||||
|
||||
buffer = MemPtrNew( nBytes + 1 );
|
||||
buffer = XP_MALLOC( globals->mpool, nBytes + 1 );
|
||||
stream_getBytes( stream, buffer, nBytes );
|
||||
/* nuke trailing <CR> chars to they don't extend length of field */
|
||||
while ( buffer[nBytes-1] == '\n' ) {
|
||||
|
@ -2919,7 +2919,8 @@ askFromStream( PalmAppGlobals* globals, XWStreamCtxt* stream, XP_S16 titleID,
|
|||
|
||||
result = palmask( globals, buffer,
|
||||
getResString( globals, STR_OK ), titleID );
|
||||
MemPtrFree( buffer );
|
||||
|
||||
XP_FREE( globals->mpool, buffer );
|
||||
|
||||
if ( closeAndDestroy ) {
|
||||
stream_destroy( stream );
|
||||
|
|
Loading…
Reference in a new issue