diff options
Diffstat (limited to 'src/intcgm/intcgm2.c')
-rw-r--r-- | src/intcgm/intcgm2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intcgm/intcgm2.c b/src/intcgm/intcgm2.c index f16c916..b6be7ee 100644 --- a/src/intcgm/intcgm2.c +++ b/src/intcgm/intcgm2.c @@ -1171,7 +1171,7 @@ int cgmb_r ( double *d ) int cgmb_s ( char **str ) { - register unsigned i; + register unsigned i = 0; unsigned char l; unsigned short l1; unsigned short cont; @@ -1206,9 +1206,7 @@ int cgmb_s ( char **str ) } s[i] = '\0'; - *str = (char*)strdup ( s ); - - free ( s ); + *str = s; return 0; } |