mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
move g_free after last use of ptr
(Made same on another branch but couldn't cherry-pick)
This commit is contained in:
parent
f45dcb36b1
commit
ba9b94a0c6
1 changed files with 2 additions and 1 deletions
|
@ -257,12 +257,13 @@ relaycon_receive( GIOChannel* source, GIOCondition XP_UNUSED_DBG(condition), gpo
|
||||||
gchar* b64 = g_base64_encode( (const guchar*)buf,
|
gchar* b64 = g_base64_encode( (const guchar*)buf,
|
||||||
((0 <= nRead)? nRead : 0) );
|
((0 <= nRead)? nRead : 0) );
|
||||||
XP_LOGF( "%s: read %zd bytes ('%s')", __func__, nRead, b64 );
|
XP_LOGF( "%s: read %zd bytes ('%s')", __func__, nRead, b64 );
|
||||||
g_free( b64 );
|
|
||||||
#ifdef COMMS_CHECKSUM
|
#ifdef COMMS_CHECKSUM
|
||||||
gchar* sum = g_compute_checksum_for_data( G_CHECKSUM_MD5, buf, nRead );
|
gchar* sum = g_compute_checksum_for_data( G_CHECKSUM_MD5, buf, nRead );
|
||||||
XP_LOGF( "%s: read %zd bytes ('%s')(sum=%s)", __func__, nRead, b64, sum );
|
XP_LOGF( "%s: read %zd bytes ('%s')(sum=%s)", __func__, nRead, b64, sum );
|
||||||
g_free( sum );
|
g_free( sum );
|
||||||
#endif
|
#endif
|
||||||
|
g_free( b64 );
|
||||||
|
|
||||||
if ( 0 <= nRead ) {
|
if ( 0 <= nRead ) {
|
||||||
const XP_U8* ptr = buf;
|
const XP_U8* ptr = buf;
|
||||||
const XP_U8* end = buf + nRead;
|
const XP_U8* end = buf + nRead;
|
||||||
|
|
Loading…
Add table
Reference in a new issue