Changeset ee6cc94 for lib


Ignore:
Timestamp:
2010-08-08T15:25:13Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2528cda
Parents:
bc090f0
Message:

Use local memory in http_encode() instead of malloc().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/misc.c

    rbc090f0 ree6cc94  
    264264void http_encode( char *s )
    265265{
    266         char *t;
     266        char t[strlen(s)+1];
    267267        int i, j;
    268268       
    269         t = g_strdup( s );
    270        
     269        strcpy( t, s );
    271270        for( i = j = 0; t[i]; i ++, j ++ )
    272271        {
     
    283282        }
    284283        s[j] = 0;
    285        
    286         g_free( t );
    287284}
    288285
Note: See TracChangeset for help on using the changeset viewer.